code: def fetch(
      tileables: List[TileableType],
      session: SessionType,
      offsets: List[int] = None,
      sizes: List[int] = None,
  ):
      log_fetchers = []
      for tileable in tileables:
          tileable = (
              tileable.data if hasattr(tileable, "data") else tileable
          )
  
          if tileable not in _tileable_to_log_fetcher:
              _tileable_to_log_fetcher[tileable] = LogFetcher(
                  tileable.op.key, session
              )
  
          log_fetcher = _tileable_to_log_fetcher[tileable]
          log_fetcher.fetch(offsets=offsets, sizes=sizes)
          log_fetchers.append(log_fetcher)
      return log_fetchers
  
imports: import functools
  import io
  import os
  import sys
  import textwrap
  import weakref
  from typing import List, Callable, Type
  from ..typing import OperandType, TileableType, SessionType
  from .context import Context
label_desc: Use image node_id 2 for calling a global function with example usage: fetch(tileables, session, offsets, sizes) and returns: log_fetchers