<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_profiles(adapter, vcf_file):
 """Given a vcf, get a profile string for each sample in the vcf based on the profile variants in the database Args: adapter(MongoAdapter):
 Adapter to mongodb vcf_file(str):
 Path to vcf file Returns: profiles (dict(str)):
 The profiles (given as strings) for each sample in vcf. """

    vcf = get_file_handle(vcf_file)
    individuals = vcf.samples
    profiles = {individual: [] for individual in individuals}

    for profile_variant in adapter.profile_variants():

        ref = profile_variant['ref']
        alt = profile_variant['alt']

        pos = profile_variant['pos']
        end = pos + 1
        chrom = profile_variant['chrom']

        region = f"{chrom}:{pos}-{end}"

        #Find variants in region

        found_variant = False
        for variant in vcf(region):

            variant_id = get_variant_id(variant)

            #If variant id i.e. chrom_pos_ref_alt matches
            if variant_id == profile_variant['_id']:
                found_variant = True
                #find genotype for each individual in vcf
                for i, individual in enumerate(individuals):

                    genotype = GENOTYPE_MAP[variant.gt_types[i]]
                    if genotype == 'hom_alt':
                        gt_str = f"{alt}{alt}"
                    elif genotype == 'het':
                        gt_str = f"{ref}{alt}"
                    else:
                        gt_str = f"{ref}{ref}"

                    #Append genotype to profile string of individual
                    profiles[individual].append(gt_str)

                #Break loop if variant is found in region
                break

        #If no call was found for variant, give all samples a hom ref genotype
        if not found_variant:
            for individual in individuals: profiles[individual].append(f"{ref}{ref}")


    return profiles