def METHOD_NAME(required_secrets=[], log_filters=[], log_file=None):
    if log_filters:
        sys.stdout = LogFilter(sys.stdout, log_filters, log_file)
        sys.stderr = LogFilter(sys.stderr, log_filters, log_file)
    log.basicConfig(stream=sys.stderr, level=os.environ.get("LOG_LEVEL", 'WARNING'))
    if 'LD_PRELOAD' in os.environ and not _is_compatible_with_hardened_malloc():
        log.warning('Disabling hardened-malloc on this CPU')
        del os.environ['LD_PRELOAD']
    """ This will set all the environment variables and retains only the secrets we need """
    if 'SECRET_KEY_FILE' in os.environ:
        try:
            secret_key = open(os.environ.get("SECRET_KEY_FILE"), "r").read().strip()
        except Exception as exc:
            log.error(f"Can't read SECRET_KEY from file: {exc}")
            raise exc
    else:
        secret_key = os.environ.get('SECRET_KEY')
    clean_env()
    # derive the keys we need
    for secret in required_secrets:
        os.environ[f'{secret}_KEY'] = hmac.new(bytearray(secret_key, 'utf-8'), bytearray(secret, 'utf-8'), 'sha256').hexdigest()
    os.system('find /run -xdev -type f -name \*.pid -print -delete')
    return {
            key: _coerce_value(os.environ.get(key, value))
            for key, value in os.environ.items()
           }