def METHOD_NAME(t, depth=0):
	indent = '  ' * depth
	result = ''
	if type(t) == binaryninja.types.StructureType:
		result = '%sStructure\n' % (indent)
		for m in t.members:
			result += METHOD_NAME(m, depth + 1)
	elif type(t) == binaryninja.types.StructureMember:
		result = '%sStructureMember "%s"\n' % (indent, t._name)
		result += type2str(t.type, depth + 1)
	elif type(t) == binaryninja.types.FunctionParameter:
		result = '%sFunctionParameter "%s"\n' % (indent, t.name)
		result += type2str(t.type, depth + 1)
	elif type(t) == binaryninja.types.NamedTypeReferenceType:
		result = '%sNamedTypeReference %s\n' % (indent, repr(t))
	elif type(t) == binaryninja.types.EnumerationType:
		result = '%sEnumeration\n' % indent
		for m in t.members:
			result += METHOD_NAME(m, depth + 1)
	elif type(t) == binaryninja.types.EnumerationMember:
		result = '%sEnumerationMember %s==%d\n' % (indent, t.name, t.value)
	elif t == None:
		result = 'unimplemented'
	return result