code: def _gen_subtask(t, session_id):
      graph = TileableGraph([t.data])
      next(TileableGraphBuilder(graph).build())
  
      chunk_graph = next(
          ChunkGraphBuilder(graph, fuse_enabled=False).build()
      )
      subtask = Subtask(
          new_task_id(), session_id, new_task_id(), chunk_graph
      )
  
      return subtask
  
imports: import asyncio
  import time
  import numpy
  import pytest
  from ....None import oscar
  from ....None import tensor
  from ....None import remote
  from ....core.graph import TileableGraph, TileableGraphBuilder, ChunkGraphBuilder
  from ....resource import Resource
  from ....utils import Timer
  from ...None import start_services, stop_services, NodeRole
  from ...meta import MetaAPI
  from ...session import SessionAPI
  from ...storage import MockStorageAPI
  from ...task import new_task_id
  from ...task.supervisor.manager import TaskManagerActor
  from ..None import SubtaskAPI, Subtask, SubtaskResult
label_desc: Use image node_id 1 for calling a global function with example usage: _gen_subtask(t, session_id) and returns: subtask