def get_vg_obj_name(obj):
    """ Gets the name of an object from the VG dataset.
    This is necessary because objects are inconsistent--
    some have 'name' and some have 'names'. :(

    Args:
        obj: an object from the VG dataset
    Returns string containing the name of the object
    """
    try:
        name = obj["name"]
    except KeyError:
        name = obj["names"][0]
    return name