code: def run(self, sensor_graph, model):
          
  
          # This check can be done if there is 1 input and it is count == 1
          # and the stream type is input or unbuffered
  
          for node, inputs, outputs in sensor_graph.iterate_bfs():
              if node.num_inputs != 1:
                  continue
  
              input_a, trigger_a = node.inputs[0]
              if input_a.selector.match_type not in [DataStream.InputType, DataStream.UnbufferedType]:
                  continue
  
              if not isinstance(trigger_a, InputTrigger):
                  continue
  
              if trigger_a.comp_string != u'==':
                  continue
  
              if not trigger_a.use_count:
                  continue
  
              if trigger_a.reference != 1:
                  continue
  
              # here we're looking at count input | unbuffered X == 1
              node.inputs[0] = (input_a, TrueTrigger())
docs: Run this optimization pass on the sensor graph
  
          If necessary, information on the device model being targeted
          can be found in the associated model argument.
  
          Args:
              sensor_graph (SensorGraph): The sensor graph to optimize
              model (DeviceModel): The device model we're using