original_docstring: 
      Turn a model class or model reference string and return a model tuple.
  
      app_label and model_name are used to resolve the scope of recursive and
      unscoped model relationship.
      
docstring: Turn a model class or model reference string and return a model tuple.
  app_label and model_name are used to resolve the scope of recursive and
  unscoped model relationship.
docstring_tokens: Turn a model class or model reference string and return a model tuple . app_label and model_name are used to resolve the scope of recursive and unscoped model relationship .
code: def resolve_relation(model, app_label=None, model_name=None):
      """
      Turn a model class or model reference string and return a model tuple.
  
      app_label and model_name are used to resolve the scope of recursive and
      unscoped model relationship.
      """
      if isinstance(model, str):
          if model == RECURSIVE_RELATIONSHIP_CONSTANT:
              if app_label is None or model_name is None:
                  raise TypeError(
                      'app_label and model_name must be provided to resolve '
                      'recursive relationships.'
                  )
              return app_label, model_name
          if '.' in model:
              app_label, model_name = model.split('.', 1)
              return app_label, model_name.lower()
          if app_label is None:
              raise TypeError(
                  'app_label must be provided to resolve unscoped model '
                  'relationships.'
              )
          return app_label, model.lower()
      return model._meta.app_label, model._meta.model_name
code_tokens: def resolve_relation ( model , app_label = None , model_name = None ) : if isinstance ( model , str ) : if model == RECURSIVE_RELATIONSHIP_CONSTANT : if app_label is None or model_name is None : raise TypeError ( 'app_label and model_name must be provided to resolve ' 'recursive relationships.' ) return app_label , model_name if '.' in model : app_label , model_name = model . split ( '.' , 1 ) return app_label , model_name . lower ( ) if app_label is None : raise TypeError ( 'app_label must be provided to resolve unscoped model ' 'relationships.' ) return app_label , model . lower ( ) return model . _meta . app_label , model . _meta . model_name
short_docstring: Turn a model class or model reference string and return a model tuple.
short_docstring_tokens: Turn a model class or model reference string and return a model tuple .
comment: """
      Turn a model class or model reference string and return a model tuple.
  
      app_label and model_name are used to resolve the scope of recursive and
      unscoped model relationship.
      """