def check_consistent_length(*tensors):
    """Check that all arrays have consistent first dimensions.
    Checks whether all objects in arrays have the same shape or length.

    Args:
        tensors : list or tensors of input objects.
            Objects that will be checked for consistent length.

    Raises:
        ValueError: "Inconsistent numbers of samples"

    """
    lengths = [tensor.size(0) * tensor.size(1) for tensor in tensors]
    uniques = np.unique(lengths)
    if len(uniques) > 1:
        raise ValueError("Inconsistent numbers of samples")
Check that all arrays have consistent first dimensions.
    Checks whether all objects in arrays have the same shape or length.

    Args:
        tensors : list or tensors of input objects.
            Objects that will be checked for consistent length.

    Raises:
        ValueError: "Inconsistent numbers of samples"

    
catalyst/metrics/functional/_misc.py