text: from simglucose.simulation.user_interface import simulate
  from simglucose.controller.base import Controller, Action
  
  
  class MyController(Controller):
      def __init__(self, init_state):
          self.init_state = init_state
          self.state = init_state
  
      def policy(self, observation, reward, done, **info):
          '''
          Every controller must have this implementation!
          ----
          Inputs:
          observation - a namedtuple defined in simglucose.simulation.env. For
                        now, it only has one entry: blood glucose level measured
                        by CGM sensor.
          reward      - current reward returned by environment
          done        - True, game over. False, game continues
          info        - additional information as key word arguments,
                        simglucose.simulation.env.T1DSimEnv returns patient_name
                        and sample_time
          ----
          Output:
          action - a namedtuple defined at the beginning of this file. The
                   controller action contains two entries: basal, bolus
          '''
          self.state = observation
          action = Action(basal=0, bolus=0)
          return action
  
      def reset(self):
          '''
          Reset the controller state to inital state, must be implemented
          '''
          self.state = self.init_state
  
  
  ctrller = MyController(0)
  simulate(controller=ctrller)
  