code: def set_credentials_file(
      username=None,
      api_key=None,
      stream_ids=None,
      proxy_username=None,
      proxy_password=None,
  ):
      """Set the keyword-value pairs in `~/.plotly_credentials`.
  
      :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) stream_ids: Stream tokens for above credentials
      :param (str) proxy_username: The un associated with with your Proxy
      :param (str) proxy_password: The pw associated with your Proxy un
  
      """
      if not ensure_writable_plotly_dir():
          raise _plotly_utils.exceptions.PlotlyError(
              "You don't have proper file permissions "
              "to run this function."
          )
      ensure_local_plotly_files()  # make sure what's there is OK
      credentials = get_credentials_file()
      if isinstance(username, str):
          credentials["username"] = username
      if isinstance(api_key, str):
          credentials["api_key"] = api_key
      if isinstance(proxy_username, str):
          credentials["proxy_username"] = proxy_username
      if isinstance(proxy_password, str):
          credentials["proxy_password"] = proxy_password
      if isinstance(stream_ids, (list, tuple)):
          credentials["stream_ids"] = stream_ids
      utils.save_json_dict(CREDENTIALS_FILE, credentials)
      ensure_local_plotly_files()
  
imports: from __future__ import absolute_import
  import urllib
  import warnings
  import copy
  from _plotly_utils import optional_imports
  import _plotly_utils.exceptions
  from _plotly_utils.files import ensure_writable_plotly_dir
  from chart_studio import session, utils
  from chart_studio.files import CONFIG_FILE, CREDENTIALS_FILE, FILE_CONTENT
label_desc: Use image node_id 3 for calling a global function with example usage: set_credentials_file(username, api_key, stream_ids, proxy_username, proxy_password) without return types