code: def namelist(value):
      
      names = value.replace(',', ' ').split()
      for n in names:
          try:
              name(n)
          except ValueError:
              raise ValueError('List of names containing an invalid name:'
                               ' %s' % n)
      return names
docs: :param value: input string
      :returns: list of identifiers separated by whitespace or commas
  
      >>> namelist('a,b')
      ['a', 'b']
      >>> namelist('a1  b_2\t_c')
      ['a1', 'b_2', '_c']
  
      >>> namelist('a1 b_2 1c')
      Traceback (most recent call last):
          ...
      ValueError: List of names containing an invalid name: 1c