code: def read_settings(filename=None, defs=None):
      
      # READ SETTINGS
      defs = listwrap(defs)
      defs.append({
          "name": ["--config", "--settings", "--settings-file", "--settings_file"],
          "help": "path to JSON file with settings",
          "type": str,
          "dest": "filename",
          "default": None,
          "required": False
      })
      args = argparse(defs)
  
      args.filename = coalesce(filename, args.filename, "./config.json")
      settings_file = File(args.filename)
      if not settings_file.exists:
          Log.error("Can not read configuration file {{filename}}", {
              "filename": settings_file.abspath
          })
      settings = mo_json_config.get_file(settings_file)
      settings.args = args
      return settings
docs: :param filename: Force load a file
      :param defs: arguments you want to accept
      :param default_filename: A config file from an environment variable (a fallback config file, if no other provided)
      :return: