code: def _filter_resources(self, all_resources, dev_bundles=False):
      filtered_resources = []
      for s in all_resources:
          filtered_resource = {}
          if "dynamic" in s:
              filtered_resource["dynamic"] = s["dynamic"]
          if "async" in s:
              if "dynamic" in s:
                  raise exceptions.ResourceException(
                      f"""
                          Can't have both 'dynamic' and 'async'.
                          {json.dumps(filtered_resource)}
                          """
                  )
  
              # Async assigns a value dynamically to 'dynamic'
              # based on the value of 'async' and config.eager_loading
              #
              # True -> dynamic if the server is not eager, False otherwise
              # 'lazy' -> always dynamic
              # 'eager' -> dynamic if server is not eager
              # (to prevent ever loading it)
              filtered_resource["dynamic"] = (
                  not self.config.eager_loading
                  if s["async"] is True
                  else (
                      s["async"] == "eager"
                      and not self.config.eager_loading
                  )
                  or s["async"] == "lazy"
              )
          if "namespace" in s:
              filtered_resource["namespace"] = s["namespace"]
          if "external_url" in s and not self.config.serve_locally:
              filtered_resource["external_url"] = s["external_url"]
          elif "dev_package_path" in s and dev_bundles:
              filtered_resource["relative_package_path"] = s[
                  "dev_package_path"
              ]
          elif "relative_package_path" in s:
              filtered_resource["relative_package_path"] = s[
                  "relative_package_path"
              ]
          elif "absolute_path" in s:
              filtered_resource["absolute_path"] = s["absolute_path"]
          elif "asset_path" in s:
              info = os.stat(s["filepath"])
              filtered_resource["asset_path"] = s["asset_path"]
              filtered_resource["ts"] = info.st_mtime
          elif self.config.serve_locally:
              warnings.warn(
                  (
                      "You have set your config to `serve_locally=True` but "
                      f"A local version of {s['external_url']} is not available.\n"
                      "If you added this file with "
                      "`app.scripts.append_script` "
                      "or `app.css.append_css`, use `external_scripts` "
                      "or `external_stylesheets` instead.\n"
                      "See https://dash.plotly.com/external-resources"
                  )
              )
              continue
          else:
              raise exceptions.ResourceException(
                  f"""
                      {json.dumps(filtered_resource)} does not have a
                      relative_package_path, absolute_path, or an external_url.
                      """
              )
  
          filtered_resources.append(filtered_resource)
  
      return filtered_resources
  
file_path: dash/dash/resources.py
imports: import json
  import warnings
  import os
  from .development.base_component import ComponentRegistry
  from .None import exceptions
label_desc: Use image node_id 3 for calling the Resources obj's underlying member method code with example usage: obj._filter_resources(all_resources, dev_bundles) and returns: filtered_resources