prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  [bug] filter_strategy config not working
  **Describe the bug**
  It seems that the `filter_strategy` config (which by the way is misspelled int the [docs](https://github.com/rochacbruno/dynaconf/blob/master/docs/configuration.md)) is not taken into account when used in the `Dynaconf` constructor.
  
  **To Reproduce**
  Steps to reproduce the behavior:
  
  1. Having the following folder structure
  Just a plain python script.
  
  2. Having the following config files:
  No config file, just using env variables
  
  4. Having the following app code:
  
  <details>
  <summary> Code </summary>
  
  **/test/test.py**
  ```python
  import dynaconf
  
  class CustomFilter:
      def __call__(self, data):
          print("this is never called")
          return {
              k: v
              for k, v in data.items()
              if k.startswith("PREFIX")
          }
  
  
  if __name__ == "__main__":
      dc = dynaconf.Dynaconf(
          envvar_prefix=False,
          filter_strategy=CustomFilter(),
      )
      print(dc.as_dict())
  ```
  
  </details>
  
  5. Executing under the following environment
  
  <details>
  <summary> Execution </summary>
  
  ```bash
  PREFIX_VAR="HELLO" OTHER_VAR="WORLD" python test.py
  ```
  
  </details>
  
  **Expected behavior**
  `CustomFilter` should be called ("this is never called" should be displayed) and only the `PREFIX_VAR` should be in dict, not `OTHER_VAR`
  
  **Environment (please complete the following information):**
   - OS: Linux version 5.10.60.1-microsoft-standard-WSL2 
   - Dynaconf Version 3.1.9
   - Framework: None
  
  **Context**
  
  I was looking for a way to filter out empty environment variables.
  
  
  </issue>
  <code>
  [start of dynaconf/loaders/env_loader.py]
  1 from __future__ import annotations
  2 
  3 from os import environ
  4 
  5 from dynaconf.utils import missing
  6 from dynaconf.utils import upperfy
  7 from dynaconf.utils.parse_conf import parse_conf_data
  8 from dynaconf.vendor.dotenv import cli as dotenv_cli
  9 
  10 
  11 IDENTIFIER = "env"
  12 
  13 
  14 def load(obj, env=None, silent=True, key=None):
  15     """Loads envvars with prefixes:
  16 
  17     `DYNACONF_` (default global) or `$(ENVVAR_PREFIX_FOR_DYNACONF)_`
  18     """
  19     global_prefix = obj.get("ENVVAR_PREFIX_FOR_DYNACONF")
  20     if global_prefix is False or global_prefix.upper() != "DYNACONF":
  21         load_from_env(obj, "DYNACONF", key, silent, IDENTIFIER + "_global")
  22 
  23     # Load the global env if exists and overwrite everything
  24     load_from_env(obj, global_prefix, key, silent, IDENTIFIER + "_global")
  25 
  26 
  27 def load_from_env(
  28     obj,
  29     prefix=False,
  30     key=None,
  31     silent=False,
  32     identifier=IDENTIFIER,
  33     env=False,  # backwards compatibility bc renamed param
  34 ):
  35     if prefix is False and env is not False:
  36         prefix = env
  37 
  38     env_ = ""
  39     if prefix is not False:
  40         if not isinstance(prefix, str):
  41             raise TypeError("`prefix/env` must be str or False")
  42 
  43         prefix = prefix.upper()
  44         env_ = f"{prefix}_"
  45 
  46     # Load a single environment variable explicitly.
  47     if key:
  48         key = upperfy(key)
  49         value = environ.get(f"{env_}{key}")
  50         if value:
  51             try:  # obj is a Settings
  52                 obj.set(key, value, loader_identifier=identifier, tomlfy=True)
  53             except AttributeError:  # obj is a dict
  54                 obj[key] = parse_conf_data(
  55                     value, tomlfy=True, box_settings=obj
  56                 )
  57 
  58     # Load environment variables in bulk (when matching).
  59     else:
  60         # Only known variables should be loaded from environment?
  61         ignore_unknown = obj.get("IGNORE_UNKNOWN_ENVVARS_FOR_DYNACONF")
  62 
  63         trim_len = len(env_)
  64         data = {
  65             key[trim_len:]: parse_conf_data(
  66                 data, tomlfy=True, box_settings=obj
  67             )
  68             for key, data in environ.items()
  69             if key.startswith(env_)
  70             and not (
  71                 # Ignore environment variables that haven't been
  72                 # pre-defined in settings space.
  73                 ignore_unknown
  74                 and obj.get(key[trim_len:], default=missing) is missing
  75             )
  76         }
  77         # Update the settings space based on gathered data from environment.
  78         if data:
  79             obj.update(data, loader_identifier=identifier)
  80 
  81 
  82 def write(settings_path, settings_data, **kwargs):
  83     """Write data to .env file"""
  84     for key, value in settings_data.items():
  85         quote_mode = (
  86             isinstance(value, str)
  87             and (value.startswith("'") or value.startswith('"'))
  88         ) or isinstance(value, (list, dict))
  89         dotenv_cli.set_key(
  90             str(settings_path),
  91             key,
  92             str(value),
  93             quote_mode="always" if quote_mode else "none",
  94         )
  95
  [end of dynaconf/loaders/env_loader.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/dynaconf/loaders/env_loader.py b/dynaconf/loaders/env_loader.py
  --- a/dynaconf/loaders/env_loader.py
  +++ b/dynaconf/loaders/env_loader.py
  @@ -76,6 +76,9 @@
           }
           # Update the settings space based on gathered data from environment.
           if data:
  +            filter_strategy = obj.get("FILTER_STRATEGY")
  +            if filter_strategy:
  +                data = filter_strategy(data)
               obj.update(data, loader_identifier=identifier)
  
verification_info: {"golden_diff": "diff --git a/dynaconf/loaders/env_loader.py b/dynaconf/loaders/env_loader.py\n--- a/dynaconf/loaders/env_loader.py\n+++ b/dynaconf/loaders/env_loader.py\n@@ -76,6 +76,9 @@\n         }\n         # Update the settings space based on gathered data from environment.\n         if data:\n+            filter_strategy = obj.get(\"FILTER_STRATEGY\")\n+            if filter_strategy:\n+                data = filter_strategy(data)\n             obj.update(data, loader_identifier=identifier)\n", "issue": "[bug] filter_strategy config not working\n**Describe the bug**\r\nIt seems that the `filter_strategy` config (which by the way is misspelled int the [docs](https://github.com/rochacbruno/dynaconf/blob/master/docs/configuration.md)) is not taken into account when used in the `Dynaconf` constructor.\r\n\r\n**To Reproduce**\r\nSteps to reproduce the behavior:\r\n\r\n1. Having the following folder structure\r\nJust a plain python script.\r\n\r\n2. Having the following config files:\r\nNo config file, just using env variables\r\n\r\n4. Having the following app code:\r\n\r\n<details>\r\n<summary> Code </summary>\r\n\r\n**/test/test.py**\r\n```python\r\nimport dynaconf\r\n\r\nclass CustomFilter:\r\n    def __call__(self, data):\r\n        print(\"this is never called\")\r\n        return {\r\n            k: v\r\n            for k, v in data.items()\r\n            if k.startswith(\"PREFIX\")\r\n        }\r\n\r\n\r\nif __name__ == \"__main__\":\r\n    dc = dynaconf.Dynaconf(\r\n        envvar_prefix=False,\r\n        filter_strategy=CustomFilter(),\r\n    )\r\n    print(dc.as_dict())\r\n```\r\n\r\n</details>\r\n\r\n5. Executing under the following environment\r\n\r\n<details>\r\n<summary> Execution </summary>\r\n\r\n```bash\r\nPREFIX_VAR=\"HELLO\" OTHER_VAR=\"WORLD\" python test.py\r\n```\r\n\r\n</details>\r\n\r\n**Expected behavior**\r\n`CustomFilter` should be called (\"this is never called\" should be displayed) and only the `PREFIX_VAR` should be in dict, not `OTHER_VAR`\r\n\r\n**Environment (please complete the following information):**\r\n - OS: Linux version 5.10.60.1-microsoft-standard-WSL2 \r\n - Dynaconf Version 3.1.9\r\n - Framework: None\r\n\r\n**Context**\r\n\r\nI was looking for a way to filter out empty environment variables.\r\n\n", "before_files": [{"content": "from __future__ import annotations\n\nfrom os import environ\n\nfrom dynaconf.utils import missing\nfrom dynaconf.utils import upperfy\nfrom dynaconf.utils.parse_conf import parse_conf_data\nfrom dynaconf.vendor.dotenv import cli as dotenv_cli\n\n\nIDENTIFIER = \"env\"\n\n\ndef load(obj, env=None, silent=True, key=None):\n    \"\"\"Loads envvars with prefixes:\n\n    `DYNACONF_` (default global) or `$(ENVVAR_PREFIX_FOR_DYNACONF)_`\n    \"\"\"\n    global_prefix = obj.get(\"ENVVAR_PREFIX_FOR_DYNACONF\")\n    if global_prefix is False or global_prefix.upper() != \"DYNACONF\":\n        load_from_env(obj, \"DYNACONF\", key, silent, IDENTIFIER + \"_global\")\n\n    # Load the global env if exists and overwrite everything\n    load_from_env(obj, global_prefix, key, silent, IDENTIFIER + \"_global\")\n\n\ndef load_from_env(\n    obj,\n    prefix=False,\n    key=None,\n    silent=False,\n    identifier=IDENTIFIER,\n    env=False,  # backwards compatibility bc renamed param\n):\n    if prefix is False and env is not False:\n        prefix = env\n\n    env_ = \"\"\n    if prefix is not False:\n        if not isinstance(prefix, str):\n            raise TypeError(\"`prefix/env` must be str or False\")\n\n        prefix = prefix.upper()\n        env_ = f\"{prefix}_\"\n\n    # Load a single environment variable explicitly.\n    if key:\n        key = upperfy(key)\n        value = environ.get(f\"{env_}{key}\")\n        if value:\n            try:  # obj is a Settings\n                obj.set(key, value, loader_identifier=identifier, tomlfy=True)\n            except AttributeError:  # obj is a dict\n                obj[key] = parse_conf_data(\n                    value, tomlfy=True, box_settings=obj\n                )\n\n    # Load environment variables in bulk (when matching).\n    else:\n        # Only known variables should be loaded from environment?\n        ignore_unknown = obj.get(\"IGNORE_UNKNOWN_ENVVARS_FOR_DYNACONF\")\n\n        trim_len = len(env_)\n        data = {\n            key[trim_len:]: parse_conf_data(\n                data, tomlfy=True, box_settings=obj\n            )\n            for key, data in environ.items()\n            if key.startswith(env_)\n            and not (\n                # Ignore environment variables that haven't been\n                # pre-defined in settings space.\n                ignore_unknown\n                and obj.get(key[trim_len:], default=missing) is missing\n            )\n        }\n        # Update the settings space based on gathered data from environment.\n        if data:\n            obj.update(data, loader_identifier=identifier)\n\n\ndef write(settings_path, settings_data, **kwargs):\n    \"\"\"Write data to .env file\"\"\"\n    for key, value in settings_data.items():\n        quote_mode = (\n            isinstance(value, str)\n            and (value.startswith(\"'\") or value.startswith('\"'))\n        ) or isinstance(value, (list, dict))\n        dotenv_cli.set_key(\n            str(settings_path),\n            key,\n            str(value),\n            quote_mode=\"always\" if quote_mode else \"none\",\n        )\n", "path": "dynaconf/loaders/env_loader.py"}]}