def check_min_size(n_row, n_min):
    """Check that an adjacency has the required number of rows and returns an error otherwise."""
    if n_row < n_min:
        raise ValueError('The graph must contain at least {} nodes.'.format
            (n_min))
    else:
        return
