def require(source_module, target_module, all_macros=False, assignments={}, prefix=''):
 seen_names = set()
 if prefix:
  prefix += '.'
 for d in (_hy_macros, _hy_reader):
  for (name, macro) in d[source_module].items():
   seen_names.add(name)
   if all_macros:
    d[target_module][(prefix + name)] = macro
   elif (name in assignments):
    d[target_module][(prefix + assignments[name])] = macro
 if (not all_macros):
  unseen = frozenset(assignments.keys()).difference(seen_names)
  if unseen:
   raise ImportError(('cannot require names: ' + repr(list(unseen))))

def require ( source_module , target_module , all_macros = False , assignments = { } , prefix = '' ) : seen_names = set ( ) if prefix : prefix += '.' for d in ( _hy_macros , _hy_reader ) : for ( name , macro ) in d [ source_module ] . items ( ) : seen_names . add ( name ) if all_macros : d [ target_module ] [ ( prefix + name ) ] = macro elif ( name in assignments ) : d [ target_module ] [ ( prefix + assignments [ name ] ) ] = macro if ( not all_macros ) : unseen = frozenset ( assignments . keys ( ) ) . difference ( seen_names ) if unseen : raise ImportError ( ( 'cannot require names: ' + repr ( list ( unseen ) ) ) )
clear out divisions where required components are not present in left .