class_docstr: Determined gives access to Determined API objects.
  
  Arguments:
      master (string, optional): The URL of the Determined master. If
          this argument is not specified, the environment variables ``DET_MASTER`` and
          ``DET_MASTER_ADDR`` will be checked for the master URL in that order.
      user (string, optional): The Determined username used for
          authentication. (default: ``determined``)
docstr: Create a new Determined object that uses an existing session.
  
  This constructor exists to help the CLI transition to using SDK methods, most of which are
  derived from a Determined object at some point in their lifespan.
  
  WARNING: Determined objects created with this contsructor will not have a token, and so
  have no access to the oauth API.
docstr_tok: ["Create","a","new","Determined","object","that","uses","an","existing","session",".","This","constructor","exists","to","help","the","CLI","transition","to","using","SDK","methods",",","most","of","which","are","derived","from","a","Determined","object","at","some","point","in","their","lifespan",".","WARNING",":","Determined","objects","created","with","this","contsructor","will","not","have","a","token",",","and","so","have","no","access","to","the","oauth","API","."]
code: def _from_session(cls, session: api.Session) -> "Determined":
      """Create a new Determined object that uses an existing session.
  
      This constructor exists to help the CLI transition to using SDK methods, most of which are
      derived from a Determined object at some point in their lifespan.
  
      WARNING: Determined objects created with this contsructor will not have a token, and so
      have no access to the oauth API.
      """
      # mypy gives new_det "Any" type, even if cls is annotated
      new_det = cls.__new__(cls)  # type: Determined
      new_det._session = session
      new_det._token = None
      return new_det
  
imports: import itertools
  import logging
  import pathlib
  import warnings
  from typing import Any, Dict, Iterable, List, Optional, Sequence, Union
  import determined
  from determined.common import api, context, util
  from determined.common.api import authentication, bindings, certs, errors
  from determined.common.experimental import checkpoint, experiment, metrics, model, oauth2_scim_client, trial, user, workspace
  from determined.common.experimental._util import OrderBy
label_desc: Use image node_id 2 for calling the Determined obj's underlying member method code with example usage: obj._from_session(cls, session) and returns: new_det