code: def allocate(self, nodes, append=True):
          # TODO: check docstring
          
  
          nodes_demand = 0
          for node in [node for node in nodes]:
              if node._allocation:
                  node._allocation.deallocate([node])
  
              node._allocation = self
              nodes_demand = nodes_demand + node.demand()
              if append:
                  self._nodes.append(node)
              else:
                  self._nodes.insert(0, node)
  
          self._demand = self._demand + nodes_demand
docs: Allocates all nodes from `nodes` list in this route
          
          Parameters
          ----------
          nodes : type
              Desc
          append : bool, defaults to True
              Desc