code: def get_namespace(
              self,
              namespace: str,
              lowercase: bool=True,
              trim_namespace: bool=True,
      ) -> Dict[str, Any]:
          
          config = {}
          for key, value in self.items():
              if key.startswith(namespace):
                  if trim_namespace:
                      new_key = key[len(namespace):]
                  else:
                      new_key = key
                  if lowercase:
                      new_key = new_key.lower()
                  config[new_key] = value
          return config
docs: Return a dictionary of keys within a namespace.
  
          A namespace is considered to be a key prefix, for example the
          keys ``FOO_A, FOO_BAR, FOO_B`` are all within the ``FOO``
          namespace. This method would return a dictionary with these
          keys and values present.
  
          .. code-block:: python
  
              config = {'FOO_A': 'a', 'FOO_BAR': 'bar', 'BAR': False}
              app.config.from_mapping(config)
              assert app.config.get_namespace('FOO_') == {'a': 'a', 'bar': 'bar'}
  
          Arguments:
              namespace: The namespace itself (should be uppercase).
              lowercase: Lowercase the keys in the returned dictionary.
              trim_namespace: Remove the namespace from the returned
                  keys.