parameters: (cls, deployment_id=None, batch_id=None,
                           target_id=None)
return_statement: return _Retriever(deployment=deployment, batch=batch, target=target)
docstring: workaround to get rid of circular import
docstring_summary: workaround to get rid of circular import
docstring_tokens: workaround to get rid of circular import
function: def _retrieve_models(cls, deployment_id=None, batch_id=None,
                           target_id=None):
          """ workaround to get rid of circular import """
          from tars.deployment.models import (TarsDeployment, TarsDeploymentBatch,
                                              TarsDeploymentTarget)
  
          deployment = batch = target = None
  
          if target_id is not None:
              target = TarsDeploymentTarget.objects.get(id=target_id)
          if batch_id is not None:
              if target is not None:
                  batch = target.batch
              else:
                  batch = TarsDeploymentBatch.objects.get(id=batch_id)
          if deployment_id is not None:
              if batch is not None:
                  deployment = batch.deployment
              elif target is not None:
                  deployment = target.batch.deployment
              else:
                  deployment = TarsDeployment.objects.get(id=deployment_id)
  
          return _Retriever(deployment=deployment, batch=batch, target=target)
function_tokens: def _retrieve_models ( cls , deployment_id = None , batch_id = None , target_id = None ) : from tars . deployment . models import ( TarsDeployment , TarsDeploymentBatch , TarsDeploymentTarget ) deployment = batch = target = None if target_id is not None : target = TarsDeploymentTarget . objects . get ( id = target_id ) if batch_id is not None : if target is not None : batch = target . batch else : batch = TarsDeploymentBatch . objects . get ( id = batch_id ) if deployment_id is not None : if batch is not None : deployment = batch . deployment elif target is not None : deployment = target . batch . deployment else : deployment = TarsDeployment . objects . get ( id = deployment_id ) return _Retriever ( deployment = deployment , batch = batch , target = target )