def METHOD_NAME(instance, field_name, ask=False, subfield=None, secret_key=None):
    #
    # ⚠️  D-D-D-DANGER ZONE ⚠️
    #
    # !!! PLEASE READ BEFORE USING THIS FUNCTION ANYWHERE !!!
    #
    # You should know that this function is used in various places throughout
    # AWX for symmetric encryption - generally it's used to encrypt sensitive
    # values that we store in the AWX database (such as SSH private keys for
    # credentials).
    #
    # If you're reading this function's code because you're thinking about
    # using it to encrypt *something new*, please remember that AWX has
    # official support for *regenerating* the SECRET_KEY (on which the
    # symmetric key is based):
    #
    # $ awx-manage regenerate_secret_key
    # $ setup.sh -k
    #
    # ...so you'll need to *also* add code to support the
    # migration/re-encryption of these values (the code in question lives in
    # `awx.main.management.commands.regenerate_secret_key`):
    #
    # For example, if you find that you're adding a new database column that is
    # encrypted, in addition to calling `encrypt_field` in the appropriate
    # places, you would also need to update the `awx-manage regenerate_secret_key`
    # so that values are properly migrated when the SECRET_KEY changes.
    #
    # This process *generally* involves adding Python code to the
    # `regenerate_secret_key` command, i.e.,
    #
    # 1.  Query the database for existing encrypted values on the appropriate object(s)
    # 2.  Decrypting them using the *old* SECRET_KEY
    # 3.  Storing newly encrypted values using the *newly generated* SECRET_KEY
    #
    """
    Return content of the given instance and field name encrypted.
    """
    try:
        value = instance.inputs[field_name]
    except (TypeError, AttributeError):
        value = getattr(instance, field_name)
    except KeyError:
        raise AttributeError(field_name)
    if isinstance(value, dict) and subfield is not None:
        value = value[subfield]
    if value is None:
        return None
    value = smart_str(value)
    if not value or value.startswith('$encrypted$') or (ask and value == 'ASK'):
        return value
    key = get_encryption_key(field_name, getattr(instance, 'pk', None), secret_key=secret_key)
    f = Fernet256(key)
    encrypted = f.encrypt(smart_bytes(value))
    b64data = smart_str(base64.b64encode(encrypted))
    tokens = ['$encrypted', 'UTF8', 'AESCBC', b64data]
    return '$'.join(tokens)