code: def is_base64(sb):
      try:
          if isinstance(sb, str):
              # Try to encode it to bytes if it's a unicode string
              sb_bytes = sb.encode("ascii")
          elif isinstance(sb, bytes):
              sb_bytes = sb
          else:
              # If it is not a byte or a string, it is not base64
              return False
  
          # Check if decoding is successful.
          decoded_params = base64.urlsafe_b64decode(sb_bytes)
          params_str = decoded_params.decode("utf-8")
          param_dict = {}
          # split on the &
          params = params_str.split("&")
          # split on the =
          for param in params:
              split_val = param.split("=")
              param_dict[split_val[0].strip()] = split_val[1].strip()
          # If the decode was successful, the input is likely base64
          return True, param_dict
      except (binascii.Error, ValueError):
          # If an error occurs, return False, as the input is not base64
          return False
  
file_path: litellm/ui/pages/user.py
imports: import streamlit
  from dotenv import load_dotenv
  import requests, base64, binascii
  import os
label_desc: Use image node_id 1 for calling a global function with example usage: is_base64(sb) and returns: True,  param_dict, False, False