def calc_conf_from_node(node_idx, point_idx) -> int:
    """
    Calculates the configuration from a node index
    :param node_idx: Integer value for the node index
    :param point_idx: Index of the point that the node belongs to within the trajectory.
    :return: Integer value for the robot configuration of the node
    """
    if point_idx >= 0:
        return node_idx - 8 * point_idx
    raise ValueError('Point index must be positive.')