parameters: (self, key)
docstring: Validate single type keys.
  
          Accepted input is a string, and arbitrarily nested iterators that
          culminate in str types.
docstring_summary: Validate single type keys.
docstring_tokens: Validate single type keys .
function: def _validate_and_split_len_one(self, key):
          """Validate single type keys.
  
          Accepted input is a string, and arbitrarily nested iterators that
          culminate in str types.
          """
          if isinstance(key, str):
              return [key]
          elif _is_iterable(key):
              keys = []
              for k in key:
                  keys.extend(self._validate_and_split_len_one(k))
              return keys
          else:
              raise KeyError("The key {} is not valid.".format(key))
function_tokens: def _validate_and_split_len_one ( self , key ) : if isinstance ( key , str ) : return [ key ] elif _is_iterable ( key ) : keys = [ ] for k in key : keys . extend ( self . _validate_and_split_len_one ( k ) ) return keys else : raise KeyError ( "The key {} is not valid." . format ( key ) )