code: def istask(x):
      """Is x a runnable task? A task is a tuple with a callable first argument.
  
      Examples
      --------
      >>> from flash.core.serve.dag.utils_test import inc
      >>> istask((inc, 1))
      True
      >>> istask(1)
      False
  
      """
      return type(x) is tuple and x and callable(x[0])
  
imports: from collections import defaultdict
  from typing import List, Sequence
  from flash.core.utilities.imports import _TOPIC_SERVE_AVAILABLE
label_desc: Use image node_id 2 for calling a global function with example usage: istask(x) and returns: unknown