import pathlib


def _get_node(path_assets: pathlib.Path, info):
    """Returns node information.

    """
    host, _, _, _, weight = info

    # Set path to secret key.
    path_sk_pem = path_assets / "configs" / host / "secret_key.pem"
    if not path_sk_pem.exists():
        raise ValueError(f"node secret_key.pem file not found: {path_sk_pem}")

    return (host, int(weight), path_sk_pem)