title: TypeError: partitions must be TopicPartition namedtuples
body: <p>I want to use <code>KafkaConsumer</code> from <code>kafka-python</code> to consumer the first N messages in a topic:</p>
  <pre><code>from kafka import KafkaConsumer as kc
  import json
  
  bootstrap_servers = ['xx.xxx.xx.xxx:9092']
  topic_name = 'my_topic_name'
  
  consumer = kc(topic_name, group_id='group1', bootstrap_servers=bootstrap_servers,
                auto_offset_reset='earliest', auto_commit_interval_ms=1000,
                enable_auto_commit=True,
                value_deserializer=lambda x: json.loads(x.decode('utf-8')))
  count = 0
  consumer.seek_to_beginning((topic_name,0))
  kjson = []
  for msg in consumer:
      if count &lt; 10:
          count = count + 1
          kjson.append(msg.value)
      else:
          print(json.dumps(kjson, indent=4))
          break
  </code></pre>
  <p>This line <code>consumer.seek_to_beginning((topic_name,0))</code> gives me the above error. The <a href="https://kafka-python.readthedocs.io/en/master/apidoc/KafkaConsumer.html" rel="nofollow noreferrer">documentation</a> specifies:</p>
  <pre><code>seek_to_beginning(*partitions)[source]
  Seek to the oldest available offset for partitions.
  
  Parameters: *partitions – Optionally provide specific TopicPartitions, otherwise default to all assigned partitions.
  Raises: AssertionError – If any partition is not currently assigned, or if no partitions are assigned.
  </code></pre>
  <p>There are 32 partitions in this topic (indexed from <code>0</code> to <code>31</code>). What would be the right syntax to start from the very beginning?</p>