code: def test_single_evaluation(self):
      bandit = BernoilliMAB(100, torch.tensor([0.3, 0.5]))
      algo = UCB1(n_arms=2)
      regret_trajectory = single_evaluation_bandit_algo(bandit, algo)
  
      self.assertIsInstance(regret_trajectory, np.ndarray)
      self.assertEqual(regret_trajectory.shape, (bandit.max_steps,))
  
      # make sure regret is non-decreasing
      self.assertGreaterEqual(
          np.diff(regret_trajectory, prepend=0).min(), 0
      )
  
imports: import unittest
  from io import BytesIO
  from itertools import cycle
  from unittest import mock
  import numpy
  import numpy.testing
  import torch
  from parameterized.parameterized import parameterized
  from pytorch_lightning import seed_everything
  from reagent.mab.mab_algorithm import get_arm_indices, place_values_at_indices, randomized_argmax, reindex_multiple_tensors
  from reagent.mab.simulation import BernoilliMAB, compare_bandit_algos, multiple_evaluations_bandit_algo, single_evaluation_bandit_algo
  from reagent.mab.thompson_sampling import BaseThompsonSampling, BernoulliBetaThompson, NormalGammaThompson
  from reagent.mab.ucb import BaseUCB, MetricUCB, UCB1, UCBTuned
label_desc: Use image node_id 2 for calling the TestSimulation obj's underlying member method code with example usage: obj.test_single_evaluation() without return types