'Takes a string key, num_partitions and available_partitions as argument and returns
a partition to be used for the message
Arguments:
key: the key to use for partitioning.
all_partitions: a list of the topic\'s partitions.
available_partitions: a list of the broker\'s currently avaliable partitions(optional).'

def __call__(self, key, all_partitions=None, available_partitions=None):

    raise NotImplementedError('partition    function    has    to    be    implemented')
