def resolve_relation(scope_model, relation):
 if (relation == RECURSIVE_RELATIONSHIP_CONSTANT):
  relation = scope_model
 if isinstance(relation, str):
  if ('.' not in relation):
   relation = ('%s.%s' % (scope_model._meta.app_label, relation))
 return relation

def resolve_relation ( scope_model , relation ) : if ( relation == RECURSIVE_RELATIONSHIP_CONSTANT ) : relation = scope_model if isinstance ( relation , str ) : if ( '.' not in relation ) : relation = ( '%s.%s' % ( scope_model . _meta . app_label , relation ) ) return relation
transform relation into a model or fully-qualified model string of the form "app_label .