code: def run(self):
      consumer = KafkaConsumer(
          bootstrap_servers="localhost:9092",
          auto_offset_reset="earliest",
      )
      consumer.subscribe(["my-topic"])
      self.valid = 0
      self.invalid = 0
  
      for message in consumer:
          if len(message.value) == msg_size:
              self.valid += 1
          else:
              self.invalid += 1
  
          if consumer_stop.is_set():
              break
  
      consumer.close()
  
file_path: kafka-python/benchmarks/load_example.py
imports: from __future__ import print_function
  import threading, logging, time
  from kafka import KafkaConsumer, KafkaProducer
label_desc: Use image node_id 1 for calling the Consumer obj's underlying member method code with example usage: obj.run() without return types