def is_flat_source(source):
 if isinstance(source, (tuple, list)):
  for sub_source in source:
   if isinstance(sub_source, (tuple, list)):
    return False
 elif (not isinstance(source, str)):
  raise TypeError(('source should be a string or a non-nested tuple/list of strings: %s' % source))
 return True

def is_flat_source ( source ) : if isinstance ( source , ( tuple , list ) ) : for sub_source in source : if isinstance ( sub_source , ( tuple , list ) ) : return False elif ( not isinstance ( source , str ) ) : raise TypeError ( ( 'source should be a string or a non-nested tuple/list of strings: %s' % source ) ) return True
returns true for a string or a non-nested tuple of strings parameters source : writeme returns writeme .