Get the genotypes for a given variant (by name).

        Args:
            name (str): The name of the variant to retrieve the genotypes.

        Returns:
            list: A list of Genotypes. This is a list in order to keep the same
            behaviour as the other functions.

def get_variant_by_name(self, name):
        """Get the genotypes for a given variant (by name).

        Args:
            name (str): The name of the variant to retrieve the genotypes.

        Returns:
            list: A list of Genotypes. This is a list in order to keep the same
            behaviour as the other functions.

        """
        try:
            geno = self.df.loc[:, name].values
            info = self.map_info.loc[name, :]

        except KeyError:
            # The variant is not in the data, so we return an empty
            # list
            logging.variant_name_not_found(name)
            return []

        else:
            return [Genotypes(
                Variant(info.name, info.chrom, info.pos, [info.a1, info.a2]),
                geno,
                reference=info.a2,
                coded=info.a1,
                multiallelic=False,
            )]