def create_poll(self):
        candidates = self.candidates.all()

        # Find out the method of the election
        if config['assignments_poll_vote_values'] == 'votes':
            yesnoabstain = False
        elif config['assignments_poll_vote_values'] == 'yesnoabstain':
            yesnoabstain = True
        else:
            # config['assignments_poll_vote_values'] == 'auto'
            # candidates <= available posts -> yes/no/abstain
            if len(candidates) <= (self.open_posts - self.elected.count()):
                yesnoabstain = True
            else:
                yesnoabstain = False

        # Create the poll with the candidates.
        poll = self.polls.create(
            description=self.poll_description_default,
            yesnoabstain=yesnoabstain)
        poll.set_options({'candidate': user} for user in candidates)

        # Add all candidates to list of speakers of related agenda item
        # TODO: Try to do this in a bulk create
        for candidate in self.candidates:
            try:
                Speaker.objects.add(candidate, self.agenda_item)
            except OpenSlidesError:
                # The Speaker is already on the list. Do nothing.
                # TODO: Find a smart way not to catch the error concerning AnonymousUser.
                pass

        return poll
:return: The IP address(es) in this `IPNetwork` object referenced by
dataset/ETHPy150Open OpenSlides/OpenSlides/openslides/assignments/models.py/Assignment.create_poll--crossover with--dataset/ETHPy150Open drkjam/netaddr/netaddr/ip/__init__.py/IPListMixin.__getitem__