code: def from_base(cls, base, repo):
          
          # pylint: disable=protected-access
          r = cls(base._host, repo, base._auth, base._insecure, base._auth_host, base._tlsverify)
          r._token = base._token
          r._headers = base._headers
          r._sessions = [base._sessions[0]]
          return r
docs: Create a :class:`DXF` object which uses the same host, settings and
          session as an existing :class:`DXFBase` object.
  
          :param base: Existing :class:`DXFBase` object.
          :type base: :class:`DXFBase`
  
          :param repo: Name of the repository to access on the registry. Typically this is of the form ``username/reponame`` but for your own registries you don't actually have to stick to that.
          :type repo: str
  
          :returns: :class:`DXF` object which shares configuration and session with ``base`` but which can also be used to operate on the ``repo`` repository.
          :rtype: :class:`DXF`