code: def sign_in(username, api_key, **kwargs):
      """
      Set set session credentials and config (not saved to file).
  
      If unspecified, credentials and config are searched for in `.plotly` dir.
  
      :param (str) username: The username you'd use to sign in to Plotly
      :param (str) api_key: The api key associated with above username
      :param (list|optional) stream_ids: Stream tokens for above credentials
      :param (str|optional) proxy_username: The un associated with with your Proxy
      :param (str|optional) proxy_password: The pw associated with your Proxy un
  
      :param (str|optional) plotly_domain:
      :param (str|optional) plotly_streaming_domain:
      :param (str|optional) plotly_api_domain:
      :param (bool|optional) plotly_ssl_verification:
      :param (bool|optional) plotly_proxy_authorization:
      :param (bool|optional) world_readable:
  
      """
      # TODO: verify these _credentials with plotly
  
      # kwargs will contain all our info
      kwargs.update(username=username, api_key=api_key)
  
      # raise error if key isn't valid anywhere
      for key in kwargs:
          if key not in CREDENTIALS_KEYS and key not in CONFIG_KEYS:
              raise _plotly_utils.exceptions.PlotlyError(
                  "{} is not a valid config or credentials key".format(
                      key
                  )
              )
  
      # add credentials, raise error if type is wrong.
      for key in CREDENTIALS_KEYS:
          if key in kwargs:
              if not isinstance(kwargs[key], CREDENTIALS_KEYS[key]):
                  raise _plotly_utils.exceptions.PlotlyError(
                      "{} must be of type '{}'".format(
                          key, CREDENTIALS_KEYS[key]
                      )
                  )
              _session["credentials"][key] = kwargs[key]
  
      # add config, raise error if type is wrong.
      for key in CONFIG_KEYS:
          if key in kwargs:
              if not isinstance(kwargs[key], CONFIG_KEYS[key]):
                  raise _plotly_utils.exceptions.PlotlyError(
                      "{} must be of type '{}'".format(
                          key, CONFIG_KEYS[key]
                      )
                  )
              _session["config"][key] = kwargs.get(key)
  
      # add plot options, raise error if type is wrong.
      for key in PLOT_OPTIONS:
          if key in kwargs:
              if not isinstance(kwargs[key], CONFIG_KEYS[key]):
                  raise _plotly_utils.exceptions.PlotlyError(
                      "{} must be of type '{}'".format(
                          key, CONFIG_KEYS[key]
                      )
                  )
              _session["plot_options"][key] = kwargs.get(key)
  
imports: from __future__ import absolute_import
  import copy
  import _plotly_utils.exceptions
label_desc: Use image node_id 1 for calling a global function with example usage: sign_in(username, api_key) without return types