code: def tasks_from_nids(self, nids):
          
          if not isinstance(nids, collections.abc.Iterable): nids = [nids]
  
          n2task = {task.node_id: task for task in self.iflat_tasks()}
          return [n2task[n] for n in nids if n in n2task]
docs: Return the list of tasks associated to the given list of node identifiers (nids).
  
          .. note::
  
              Invalid ids are ignored