def obj_to_ref(obj):
 try:
  ref = ('%s:%s' % (obj.__module__, get_callable_name(obj)))
  obj2 = ref_to_obj(ref)
  if (obj != obj2):
   raise ValueError
 except Exception:
  raise ValueError(('Cannot determine the reference to %r' % obj))
 return ref

def obj_to_ref ( obj ) : try : ref = ( '%s:%s' % ( obj . __module__ , get_callable_name ( obj ) ) ) obj2 = ref_to_obj ( ref ) if ( obj != obj2 ) : raise ValueError except Exception : raise ValueError ( ( 'Cannot determine the reference to %r' % obj ) ) return ref
returns the path to the given object .