def get_configs(self, name=None):
        """
        Returns registred configurations.

        * If ``name`` argument is not given, default behavior is to return
          every config from all registred config;
        * If ``name`` argument is given, just return its config and nothing
          else;

        Keyword Arguments:
            name (string): Specific configuration name to return.

        Raises:
            NotRegisteredError: If given config name does not exist in
            registry.

        Returns:
            dict: Configurations.
        """
        if name:
            if name not in self.registry:
                msg = "Given config name '{}' is not registered."
                raise NotRegisteredError(msg.format(name))

            return {name: self.registry[name]}
        return self.registry
def get_configs ( self , name = None ) : if name : if name not in self . registry : msg = "Given config name '{}' is not registered." raise NotRegisteredError ( msg . format ( name ) ) return { name : self . registry [ name ] } return self . registry
Returns registred configurations.

        * If ``name`` argument is not given, default behavior is to return
          every config from all registred config;
        * If ``name`` argument is given, just return its config and nothing
          else;

        Keyword Arguments:
            name (string): Specific configuration name to return.

        Raises:
            NotRegisteredError: If given config name does not exist in
            registry.

        Returns:
            dict: Configurations.