code: def to_dict(self):
      result: Dict = {
          self.type: {
              AWS_KEY: self.key,
              AWS_SECRET_KEY: self.secret_key,
          }
      }
      if self.session_token is not None:
          result[self.type][AWS_SESSION_TOKEN] = self.session_token
      if self.region is not None:
          result[self.type][AWS_REGION] = self.region
      if self.profile is not None:
          result[self.type][AWS_PROFILE] = self.profile
      return result
  
file_path: studio/studio/credentials/credentials.py
imports: import hashlib
  from typing import Dict
  from studio.util import logs, util
  from studio.storage import storage_setup
label_desc: Use image node_id 9 for calling the Credentials obj's underlying member method code with example usage: obj.to_dict() and returns: result