def METHOD_NAME(
    dims: int | tuple, seed: int | np.random.Generator | None = None
) -> Statevector:
    """Generator a random Statevector.
    The statevector is sampled from the uniform (Haar) measure.
    Args:
        dims (int or tuple): the dimensions of the state.
        seed (int or np.random.Generator): Optional. Set a fixed seed or
                                           generator for RNG.
    Returns:
        Statevector: the random statevector.
    """
    if seed is None:
        rng = np.random.default_rng()
    elif isinstance(seed, np.random.Generator):
        rng = seed
    else:
        rng = default_rng(seed)
    dim = np.prod(dims)
    # Random array over interval (0, 1]
    x = rng.random(dim)
    x += x == 0
    x = -np.log(x)
    sumx = sum(x)
    phases = rng.random(dim) * 2.0 * np.pi
    return Statevector(np.sqrt(x / sumx) * np.exp(1j * phases), dims=dims)