code: func (cgi *ConsumergroupInstance) ClaimPartition(topic string, partition int32) error {
  	root := fmt.Sprintf("%s/consumers/%s/owners/%s", cgi.cg.kz.conf.Chroot, cgi.cg.Name, topic)
  	if err := cgi.cg.kz.mkdirRecursive(root); err != nil {
  		return err
  	}
  
  	// Create an ephemeral node for the partition to claim the partition for this instance
  	node := fmt.Sprintf("%s/%d", root, partition)
  	err := cgi.cg.kz.create(node, []byte(cgi.ID), true)
  	switch err {
  	case zk.ErrNodeExists:
  		data, _, err := cgi.cg.kz.conn.Get(node)
  		if err != nil {
  			return err
  		}
  		if string(data) != cgi.ID {
  			// Return a separate error for this, to allow for implementing a retry mechanism.
  			return ErrPartitionClaimedByOther
  		}
  		return nil
  	default:
  		return err
  	}
  }
docs: // Claim claims a topic/partition ownership for a consumer ID within a group. If the
  // partition is already claimed by another running instance, it will return ErrAlreadyClaimed.