def column_families(keyspace=None):
 sys = _sys_mgr()
 ksps = sys.list_keyspaces()
 if keyspace:
  if (keyspace in ksps):
   return list(sys.get_keyspace_column_families(keyspace).keys())
  else:
   return None
 else:
  ret = {}
  for kspace in ksps:
   ret[kspace] = list(sys.get_keyspace_column_families(kspace).keys())
  return ret

def column_families ( keyspace = None ) : sys = _sys_mgr ( ) ksps = sys . list_keyspaces ( ) if keyspace : if ( keyspace in ksps ) : return list ( sys . get_keyspace_column_families ( keyspace ) . keys ( ) ) else : return None else : ret = { } for kspace in ksps : ret [ kspace ] = list ( sys . get_keyspace_column_families ( kspace ) . keys ( ) ) return ret
return existing column families for all keyspaces or just the provided one .