code: def pull(self, i):
          '''
          Return the payout from a single pull of the bandit i's arm.
  
          Parameters
          ----------
          i : int
              Index of bandit.
  
          Returns
          -------
          float or None
          '''
  
          if self.live:
              if len(self.payouts[i]) > 0:
                  return self.payouts[i].pop()
              else:
                  return None
          else:
              if np.random.rand() < self.probs[i]:
                  return self.payouts[i]
              else:
                  return 0.f pull(self, i):
          '''
          Return the payout from a single pull of the bandit i's arm.
  
          Parameters
          ----------
          i : int
              Index of bandit.
  
          Returns
          -------
          float or None
          '''
  
          if self.live:
              if len(self.payouts[i]) > 0:
                  return self.payouts[i].pop()
              else:
                  return None
          else:
              if np.random.rand() < self.probs[i]:
                  return self.payouts[i]
              else:
                  return 0.0
docs: Return the payout from a single pull of the bandit i's arm.
  
          Parameters
          ----------
          i : int
              Index of bandit.
  
          Returns
          -------
          float or None