code: def _loris_adapter(composite, user=None, password=None, **kwargs):
      from datalad.support.third.loris_token_generator import (
          LORISTokenGenerator,
      )
  
      gen = LORISTokenGenerator(url=composite.url)
      token = gen.generate_token(user, password)
  
      return dict(token=token)
  
imports: import time
  from ..support.exceptions import AccessDeniedError, CapturedException
  from ..support.keyring_ import keyring
  from ..ui import ui
  from ..utils import auto_repr
  from ..support.network import iso8601_to_epoch
  from datalad import cfg
  from datalad.config import anything2bool
  from datalad.distribution.dataset import Dataset
  from datalad.local.gitcredential import GitCredentialInterface
  from logging import getLogger
label_desc: Use image node_id 2 for calling a global function with example usage: _loris_adapter(composite, user, password) and returns: dict