code: def is_non_segregating(self, allele=None):
          
  
          if allele is None:
              return self.allelism() <= 1
          else:
              return (self.allelism() == 1) & (self.values[:, allele] > 0)
docs: Find non-segregating variants (where at most one allele is
          observed).
  
          Parameters
          ----------
          allele : int, optional
              Allele index.
  
          Returns
          -------
          out : ndarray, bool, shape (n_variants,)
              Boolean array where elements are True if variant matches the
              condition.
  
          Examples
          --------
  
          >>> import allel
          >>> g = allel.GenotypeArray([[[0, 0], [0, 0]],
          ...                          [[0, 0], [0, 1]],
          ...                          [[0, 2], [1, 1]],
          ...                          [[2, 2], [-1, -1]]])
          >>> ac = g.count_alleles()
          >>> ac.is_non_segregating()
          array([ True, False, False,  True])
          >>> ac.is_non_segregating(allele=2)
          array([False, False, False,  True])