code: def task_search(self, task_str, **kwargs):
          
          self.prune()
          result = collections.defaultdict(dict)
          for task in self._state.get_active_tasks():
              if task.id.find(task_str) != -1:
                  serialized = self._serialize_task(task.id, include_deps=False)
                  result[task.status][task.id] = serialized
          return result
docs: Query for a subset of tasks by task_id.
  
          :param task_str:
          :return: