# Path: striatum/utils/misc.py
# def get_random_state(random_state=None):
#     if random_state is None:
#         random_state = np.random.RandomState()
#     elif not isinstance(random_state, np.random.RandomState):
#         random_state = np.random.RandomState(seed=random_state)
#     return random_state


from six.moves import range
from .utils import get_random_state
import numpy as np
import matplotlib.pyplot as plt
                  random_state=None):
    """Simulate dataset for the contextual bandit problem.

    Parameters
    ----------
    n_rounds: int
        Total number of (context, reward) tuples you want to generate.

    context_dimension: int
        Dimension of the context.

    action_storage : ActionStorage object
        The ActionStorage object to store actions.

    algorithm: string
        The bandit algorithm you want to use.

    random_state: {int, np.random.RandomState} (default: None)
        If int, np.random.RandomState will used it as seed. If None, a random
        seed will be used.

    Return
    ---------
    context: dict
        The dict stores contexts (dict with {action_id: context_dimension
        ndarray}) at each iteration.

    desired_actions: dict
        The action which will receive reward 1 ({history_id: action_id}).
    """

# Path: striatum/utils/misc.py
# def get_random_state(random_state=None):
#     if random_state is None:
#         random_state = np.random.RandomState()
#     elif not isinstance(random_state, np.random.RandomState):
#         random_state = np.random.RandomState(seed=random_state)
#     return random_state


# Path: striatum/simulation.py
from six.moves import range
from .utils import get_random_state
import numpy as np
import matplotlib.pyplot as plt

                  random_state=None):
    """Simulate dataset for the contextual bandit problem.

    Parameters
    ----------
    n_rounds: int
        Total number of (context, reward) tuples you want to generate.

    context_dimension: int
        Dimension of the context.

    action_storage : ActionStorage object
        The ActionStorage object to store actions.

    algorithm: string
        The bandit algorithm you want to use.

    random_state: {int, np.random.RandomState} (default: None)
        If int, np.random.RandomState will used it as seed. If None, a random
        seed will be used.

    Return
    ---------
    context: dict
        The dict stores contexts (dict with {action_id: context_dimension
        ndarray}) at each iteration.

    desired_actions: dict
        The action which will receive reward 1 ({history_id: action_id}).
    """

    random_state = get_random_state(random_state)