code: def basic_auth(username, password):
      """
      Creates the basic auth value to be used in an authorization header.
  
      This is mostly copied from the requests library.
  
      :param (str) username: A Plotly username.
      :param (str) password: The password for the given Plotly username.
      :returns: (str) An 'authorization' header for use in a request header.
  
      """
      if isinstance(username, str):
          username = username.encode("latin1")
  
      if isinstance(password, str):
          password = password.encode("latin1")
  
      return "Basic " + to_native_ascii_string(
          b64encode(b":".join((username, password))).strip()
      )
  
imports: from base64 import b64encode
  from requests.compat import builtin_str, is_py2
label_desc: Use image node_id 4 for calling a global function with example usage: basic_auth(username, password) and returns: unknown