def _resolve_name(val):
 return (val if isinstance(val, six.string_types) else val.name)

def _resolve_name ( val ) : return ( val if isinstance ( val , six . string_types ) else val . name )
takes an object or a name and returns the name .