code: def format(name):
      # AWS Event Bridge has a limit of 64 chars for rule names.
      # We truncate the rule name if the computed name is greater
      # than 64 chars and append a hashed suffix to ensure uniqueness.
      if len(name) > 64:
          name_hash = to_unicode(
              base64.b32encode(sha1(to_bytes(name)).digest())
          )[:16].lower()
          # construct an 64 character long rule name
          return "%s-%s" % (name[:47], name_hash)
      else:
          return name
  
file_path: metaflow/metaflow/plugins/aws/step_functions/event_bridge_client.py
imports: import base64
  import json
  from hashlib import sha1
  from metaflow.util import to_bytes, to_unicode
label_desc: Use image node_id 1 for calling a global function with example usage: format(name) and returns: unknown, name