code: def context():
      
      job = JobBackend()
  
      offline = False
      if '1' == os.getenv('AETROS_OFFLINE', ''):
          offline = True
  
      if os.getenv('AETROS_JOB_ID'):
          job.load(os.getenv('AETROS_JOB_ID'))
          if not offline:
              job.connect()
      else:
          job.create()
          if not offline:
              job.connect()
  
      job.start(offline=offline)
  
      return job
docs: Returns a new JobBackend instance which connects to AETROS Trainer
      based on "model" in aetros.yml or (internal: env:AETROS_MODEL_NAME environment variable).
  
      internal: If env:AETROS_JOB_ID is not defined, it creates a new job.
  
      Job is ended either by calling JobBackend.done(), JobBackend.fail() or JobBackend.abort().
      If the script ends without calling one of the methods above, JobBackend.stop() is called and exit code defines
      whether it is a fail() or done() result.
  
      :return: JobBackend