code: def default(self, obj):
      if isinstance(obj, luigi.Task):
          return TaskInstanceParameter().serialize(obj)
      # Let the base class default method raise the TypeError
      return json.JSONEncoder.default(self, obj)
  
imports: import bz2
  import json
  from logging import getLogger
  import luigi
  from luigi import task_register
  import gokart
label_desc: Use image node_id 1 for calling the _TaskInstanceEncoder obj's underlying member method code with example usage: obj.default(obj) and returns: json, TaskInstanceParameter