'Create a :class:`~SetPartitioner` instance
:param client: A :class:`~kazoo.client.KazooClient` instance.
:param path: The partition path to use.
:param set: The set of items to partition.
:param partition_func: A function to use to decide how to
partition the set.
:param identifier: An identifier to use for this member of the
party when participating. Defaults to the
hostname + process id.
:param time_boundary: How long the party members must be stable
before allocation can complete.'

def __init__(self, client, path, set, partition_func=None, identifier=None, time_boundary=30):

    self.state = PartitionState.ALLOCATING
    self._client = client
    self._path = path
    self._set = set
    self._partition_set = []
    self._partition_func = (partition_func or self._partitioner)
    self._identifier = (identifier or ('%s-%s' % (socket.getfqdn(), os.getpid())))
    self._locks = []
    self._lock_path = '/'.join([path, 'locks'])
    self._party_path = '/'.join([path, 'party'])
    self._time_boundary = time_boundary
    self._acquire_event = client.handler.event_object()
    client.ensure_path(path)
    client.ensure_path(self._lock_path)
    client.ensure_path(self._party_path)
    self._party = client.ShallowParty(self._party_path, identifier=self._identifier)
    self._party.join()
    self._was_allocated = False
    self._state_change = client.handler.rlock_object()
    client.add_listener(self._establish_sessionwatch)
    self._children_updated = False
    self._child_watching(self._allocate_transition, async=True)
