def assert_minimum_rank(inputs, rank: int):
    """Asserts the rank of the input is at least `rank`."""
    if inputs.ndim < rank:
        raise ValueError('Input %r must have rank >= %d' % (inputs, rank))
