code: def encrypt(string: bytes, key: str) -> bytes:
      hashed_string = hashlib.sha256(key.encode()).digest()
  
      fernet_key = base64.urlsafe_b64encode(hashed_string)
  
      cipher = Fernet(fernet_key)
      return cipher.encrypt(string)
  
imports: import argparse
  import datetime
  from functools import wraps
  import hashlib
  import base64
  from cryptography.fernet import Fernet
  from collections.abc import Callable
  import requests
  from mindsdb_sql import get_lexer_parser
  from mindsdb_sql.parser.ast import Identifier
  from mindsdb.utilities.fs import create_process_mark, delete_process_mark, set_process_mark
  from mindsdb.utilities import log
label_desc: Use image node_id 8 for calling a global function with example usage: encrypt(string, key) and returns: cipher