def METHOD_NAME(cls, path: pathlib.Path) -> "ConfigReader":
    r"""Load data from file path
    **YAML file**
    *For demonstration only,* create a YAML file:
    >>> yaml_file = tmp_path / 'my_config.yaml'
    >>> yaml_file.write_text('session_name: my session', encoding='utf-8')
    24
    *Read YAML file*:
    >>> cfg = ConfigReader.from_file(yaml_file)
    >>> cfg
    <tmuxp.config_reader.ConfigReader object at ...>
    >>> cfg.content
    {'session_name': 'my session'}
    **JSON file**
    *For demonstration only,* create a JSON file:
    >>> json_file = tmp_path / 'my_config.json'
    >>> json_file.write_text('{"session_name": "my session"}', encoding='utf-8')
    30
    *Read JSON file*:
    >>> cfg = ConfigReader.from_file(json_file)
    >>> cfg
    <tmuxp.config_reader.ConfigReader object at ...>
    >>> cfg.content
    {'session_name': 'my session'}
    """
    return cls(content=cls._from_file(path=path))