# Path: pyphi/validate.py
# def direction(direction, allow_bi=False):
# def tpm(tpm, check_independence=True):
# def conditionally_independent(tpm):
# def connectivity_matrix(cm):
# def node_labels(node_labels, node_indices):
# def network(n):
# def is_network(network):
# def node_states(state):
# def state_length(state, size):
# def state_reachable(subsystem):
# def cut(cut, node_indices):
# def subsystem(s):
# def time_scale(time_scale):
# def partition(partition):
# def coarse_grain(coarse_grain):
# def blackbox(blackbox):
# def blackbox_and_coarse_grain(blackbox, coarse_grain):
# def relata(relata):
#     N = tpm.shape[-1]
# 
# Path: pyphi/models/cmp.py
# def sametype(func):
#     def wrapper(self, other):  # pylint: disable=missing-docstring
#     def order_by(self):
#     def __lt__(self, other):
#     def __le__(self, other):
#     def __gt__(self, other):
#     def __ge__(self, other):
#     def __eq__(self, other):
#     def __ne__(self, other):
# def numpy_aware_eq(a, b):
# def general_eq(a, b, attributes):
# class Orderable:


import collections
from pyphi import validate
from pyphi.models import cmp
    """

    def __init__(self, labels, node_indices):
        if labels is None:
            labels = default_labels(node_indices)

        self.labels = tuple(label for label in labels)
        self.node_indices = node_indices

        validate.node_labels(self.labels, node_indices)

        # Dicts mapping indices to labels and vice versa
        self._l2i = dict(zip(self.labels, self.node_indices))
        self._i2l = dict(zip(self.node_indices, self.labels))

    def __len__(self):
        return len(self.labels)

    def __iter__(self):
        return iter(self.labels)

    def __contains__(self, x):
        return x in self.labels

    def __getitem__(self, x):
        return self.labels[x]

    def __repr__(self):
        return "NodeLabels({})".format(self.labels)


# Path: pyphi/validate.py
# def direction(direction, allow_bi=False):
# def tpm(tpm, check_independence=True):
# def conditionally_independent(tpm):
# def connectivity_matrix(cm):
# def node_labels(node_labels, node_indices):
# def network(n):
# def is_network(network):
# def node_states(state):
# def state_length(state, size):
# def state_reachable(subsystem):
# def cut(cut, node_indices):
# def subsystem(s):
# def time_scale(time_scale):
# def partition(partition):
# def coarse_grain(coarse_grain):
# def blackbox(blackbox):
# def blackbox_and_coarse_grain(blackbox, coarse_grain):
# def relata(relata):
#     N = tpm.shape[-1]
# 
# Path: pyphi/models/cmp.py
# def sametype(func):
#     def wrapper(self, other):  # pylint: disable=missing-docstring
#     def order_by(self):
#     def __lt__(self, other):
#     def __le__(self, other):
#     def __gt__(self, other):
#     def __ge__(self, other):
#     def __eq__(self, other):
#     def __ne__(self, other):
# def numpy_aware_eq(a, b):
# def general_eq(a, b, attributes):
# class Orderable:


# Path: pyphi/labels.py
import collections
from pyphi import validate
from pyphi.models import cmp

    """

    def __init__(self, labels, node_indices):
        if labels is None:
            labels = default_labels(node_indices)

        self.labels = tuple(label for label in labels)
        self.node_indices = node_indices

        validate.node_labels(self.labels, node_indices)

        # Dicts mapping indices to labels and vice versa
        self._l2i = dict(zip(self.labels, self.node_indices))
        self._i2l = dict(zip(self.node_indices, self.labels))

    def __len__(self):
        return len(self.labels)

    def __iter__(self):
        return iter(self.labels)

    def __contains__(self, x):
        return x in self.labels

    def __getitem__(self, x):
        return self.labels[x]

    def __repr__(self):
        return "NodeLabels({})".format(self.labels)


    @cmp.sametype