code: def clock(self, interval, basis="system"):
          
  
          if basis == "system":
              if (interval % 10) == 0:
                  tick = self.allocator.attach_stream(self.system_tick)
                  count = interval // 10
              else:
                  tick = self.allocator.attach_stream(self.fast_tick)
                  count = interval
  
              trigger = InputTrigger(u'count', '>=', count)
              return (tick, trigger)
          elif basis == 'tick_1':
              tick = self.allocator.attach_stream(self.user1_tick)
              trigger = InputTrigger(u'count', '>=', interval)
              return (tick, trigger)
          elif basis == 'tick_2':
              tick = self.allocator.attach_stream(self.user2_tick)
              trigger = InputTrigger(u'count', '>=', interval)
              return (tick, trigger)
  
          raise SensorGraphSemanticError("Unkwown tick source specified in RootScope.clock", basis=basis)
docs: Return a NodeInput tuple for triggering an event every interval.
  
          Args:
              interval (int): The interval at which this input should
                  trigger. If basis == system (the default), this interval must
                  be in seconds.  Otherwise it will be in units of whatever the
                  basis tick is configured with.
              basis (str): The basis to use for calculating the interval.  This
                  can either be system, tick_1 or tick_2.  System means that the
                  clock will use either the fast or regular builtin tick.  Passing
                  tick_1 or tick_2 will cause the clock to be generated based on
                  the selected tick.