def serialize_type(name, accessor, types):
 name = name.strip()
 description = type_description(name, types)
 if ('struct' in description):
  return serialize_struct_type(name, accessor, types)
 elif ('template' in description):
  return serialize_type_with_template(name, accessor, types)
 else:
  cast = description.get('cast', dereference_type(name))
  return serialize_atomic_type(name, cast, accessor)

def serialize_type ( name , accessor , types ) : name = name . strip ( ) description = type_description ( name , types ) if ( 'struct' in description ) : return serialize_struct_type ( name , accessor , types ) elif ( 'template' in description ) : return serialize_type_with_template ( name , accessor , types ) else : cast = description . get ( 'cast' , dereference_type ( name ) ) return serialize_atomic_type ( name , cast , accessor )
returns a serialization statement for the given type .