def METHOD_NAME(samples, genome_version, parsed_variant_ids, user, return_all_queried_families=False):
    search = {
        'variant_ids': [parsed_id for parsed_id in parsed_variant_ids.values() if parsed_id],
        'variant_keys': [variant_id for variant_id, parsed_id in parsed_variant_ids.items() if not parsed_id],
    }
    search_body = _format_search_body(samples, genome_version, len(parsed_variant_ids), search)
    response_json = _execute_search(search_body, user)
    if return_all_queried_families:
        expected_family_guids = set(samples.values_list('individual__family__guid', flat=True))
        _validate_expected_families(response_json['results'], expected_family_guids)
    return response_json['results']