code: def normalize_nucleotide_string(
          nucleotides,
          allow_extended_nucleotides=False,
          empty_chars=".-",
          treat_nan_as_empty=True):
      
      if nucleotides in empty_chars:
          return ""
      elif treat_nan_as_empty and isinstance(nucleotides, float) and np.isnan(nucleotides):
          return ""
  
      require_string(nucleotides, name="nucleotide string")
  
      nucleotides = nucleotides.upper()
  
      if allow_extended_nucleotides:
          valid_nucleotides = EXTENDED_NUCLEOTIDES
      else:
          valid_nucleotides = STANDARD_NUCLEOTIDES
  
      if not set(nucleotides) <= valid_nucleotides:
          raise ValueError(
              "Invalid character(s) in nucleotide string: %s" % (
                  ",".join(set(nucleotides) - valid_nucleotides),))
  
      return nucleotides
docs: Normalizes a nucleotide string by converting various ways of encoding empty
      strings into "", making all letters upper case, and checking to make sure
      all letters in the string are actually nucleotides.
  
      Parameters
      ----------
      nucleotides : str
          Sequence of nucleotides, e.g. "ACCTG"
  
      extended_nucleotides : bool
          Allow non-canonical nucleotide characters like 'X' for unknown base
  
      empty_chars : str
          Characters which encode empty strings, such as "." used in VCF format
          or "-" used in MAF format
  
      treat_nan_as_empty : bool
          Some MAF files represent deletions/insertions with NaN ref/alt values