code: def koji_login(session,
                 proxyuser=None,
                 ssl_certs_dir=None,
                 krb_principal=None,
                 krb_keytab=None):
      
  
      kwargs = {}
      if proxyuser:
          kwargs['proxyuser'] = proxyuser
  
      if ssl_certs_dir:
          # Use certificates
          logger.info("Using SSL certificates for Koji authentication")
          kwargs['cert'] = os.path.join(ssl_certs_dir, 'cert')
  
          # serverca is not required in newer versions of koji, but if set
          # koji will always ensure file exists
          # NOTE: older versions of koji may require this to be set, in
          # that case, make sure serverca is passed in
          serverca_path = os.path.join(ssl_certs_dir, 'serverca')
          if os.path.exists(serverca_path):
              kwargs['serverca'] = serverca_path
  
          # Older versions of koji actually require this parameter, even though
          # it's completely ignored.
          kwargs['ca'] = None
  
          result = session.ssl_login(**kwargs)
      else:
          # Use Kerberos
          logger.info("Using Kerberos for Koji authentication")
          if krb_principal and krb_keytab:
              kwargs['principal'] = krb_principal
              kwargs['keytab'] = krb_keytab
  
          result = session.krb_login(**kwargs)
  
      if not result:
          raise RuntimeError('Unable to perform Koji authentication')
  
      return result
docs: Choose the correct login method based on the available credentials,
      and call that method on the provided session object.
  
      :param session: koji.ClientSession instance
      :param proxyuser: str, proxy user
      :param ssl_certs_dir: str, path to "cert" (required), and "serverca" (optional)
      :param krb_principal: str, name of Kerberos principal
      :param krb_keytab: str, Kerberos keytab
      :return: None