def get_np_random(seed=None, return_seed=False):
    """
    Generating a numpy.RandomState give a seed
    Args:
        seed: seed for thr random number generator (rng)
        return_seed: return the seed for seeding the rgg

    Returns: rng (with seed)

    """
    if seed is not None and not (isinstance(seed, int) and 0 <= seed):
        raise logging.error('Seed must be a non-negative integer or omitted, not {}'.format(seed))

    seed = create_seed(seed)

    rng = np.random.RandomState()

    rng.seed(_int_list_from_bigint(hash_seed(seed)))

    if return_seed:
        return rng, seed
    else:
        return rng

    Generating a numpy.RandomState give a seed
    Args:
        seed: seed for thr random number generator (rng)
        return_seed: return the seed for seeding the rgg

    Returns: rng (with seed)

    
metadrive/utils/random_utils.py