<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_neighbourhoods(self, force):
 """ Get a list of all neighbourhoods for a force. Uses the neighbourhoods_ API call. .. _neighbourhoods: https://data.police.uk/docs/method/neighbourhoods/ :param force: The force to get neighbourhoods for (either by ID or :class:`forces.Force` object) :type force: str or :class:`forces.Force` :rtype: list :return: A ``list`` of :class:`neighbourhoods.Neighbourhood` objects (one for each Neighbourhood Policing Team in the given force). """


        if not isinstance(force, Force):
            force = Force(self, id=force)

        neighbourhoods = []
        for n in self.service.request('GET', '%s/neighbourhoods' % force.id):
            neighbourhoods.append(
                Neighbourhood(self, force=force, id=n['id'], name=n['name']))
        return sorted(neighbourhoods, key=lambda n: n.name)