parameters: (filename: Union[str, Path])
docstring: Load yaml or json settings file.
  
      Parameters
      ----------
      filename : Union[str, Path]
          path to file
  
      Returns
      -------
      Dict[str, Any]
          loaded dictionary
  
      Raises
      ------
      TypeError
          if the supplied file is of unsupported type
docstring_summary: Load yaml or json settings file.
docstring_tokens: Load yaml or json settings file .
function: def j_loader(filename: Union[str, Path]) -> Dict[str, Any]:
      """Load yaml or json settings file.
  
      Parameters
      ----------
      filename : Union[str, Path]
          path to file
  
      Returns
      -------
      Dict[str, Any]
          loaded dictionary
  
      Raises
      ------
      TypeError
          if the supplied file is of unsupported type
      """
      filepath = Path(filename)
      if filepath.suffix.endswith("json"):
          with filepath.open() as fp:
              return json.load(fp)
      elif filepath.suffix.endswith(("yml", "yaml")):
          with filepath.open() as fp:
              return yaml.safe_load(fp)
      else:
          raise TypeError("config file must be json, or yaml/yml")
function_tokens: def j_loader ( filename : Union [ str , Path ] ) -> Dict [ str , Any ] : filepath = Path ( filename ) if filepath . suffix . endswith ( "json" ) : with filepath . open ( ) as fp : return json . load ( fp ) elif filepath . suffix . endswith ( ( "yml" , "yaml" ) ) : with filepath . open ( ) as fp : return yaml . safe_load ( fp ) else : raise TypeError ( "config file must be json, or yaml/yml" )