code: def from_packed(cls, packed):
          
  
          # check arguments
          packed = np.asarray(packed)
          check_ndim(packed, 2)
          check_dtype(packed, 'u1')
          packed = memoryview_safe(packed)
  
          data = genotype_array_unpack_diploid(packed)
          return cls(data)
docs: Unpack diploid genotypes that have been bit-packed into single
          bytes.
  
          Parameters
          ----------
          packed : ndarray, uint8, shape (n_variants, n_samples)
              Bit-packed diploid genotype array.
  
          Returns
          -------
          g : GenotypeArray, shape (n_variants, n_samples, 2)
              Genotype array.
  
          Examples
          --------
  
          >>> import allel
          >>> import numpy as np
          >>> packed = np.array([[0, 1],
          ...                    [2, 17],
          ...                    [34, 239]], dtype='u1')
          >>> allel.GenotypeArray.from_packed(packed)
          <GenotypeArray shape=(3, 2, 2) dtype=int8>
          0/0 0/1
          0/2 1/1
          2/2 ./.