def structure_copy(structure):
 if hasattr(structure, 'copy'):
  return structure.copy()
 return iter_copy(structure)

def structure_copy ( structure ) : if hasattr ( structure , 'copy' ) : return structure . copy ( ) return iter_copy ( structure )
returns a copy of the given structure .