def compare_location_and_region(first_file, second_file):
    """
    Compares versions for osfstoragefiles -
    Compares location['bucket'] and location['object'].
    Also compares version region_ids.
    """
    first_loc = first_file['versions__location']
    second_loc = second_file['versions__location']

    if first_loc and second_loc:
        return first_loc['bucket'] == second_loc['bucket'] and \
            first_loc['object'] == second_loc['object'] and \
            first_file['versions__region_id'] == first_file['versions__region_id']
    return False