code: def estimate_size(results: Dict[str, Any], op: OperandType):
      try:
          size_estimator = _op_type_to_size_estimator[type(op)]
      except KeyError:
          size_estimator = type(op).estimate_size
  
      try:
          return size_estimator(results, op)
      except NotImplementedError:
          for op_cls in type(op).__mro__:
              if op_cls in _op_type_to_size_estimator:
                  size_estimator = _op_type_to_size_estimator[op_cls]
                  _op_type_to_size_estimator[type(op)] = size_estimator
                  return size_estimator(results, op)
          raise KeyError(
              f"No handler found for op: {op} to estimate size"
          )
  
imports: import sys
  from typing import Any, Callable, Dict, List, Tuple, Type, Union
  import numpy
  from ...metrics import Metrics
  from ...typing import TileableType, ChunkType, OperandType
  from ...utils import calc_data_size
  from ..context import Context
  from ..mode import is_eager_mode
  from ..entity import OutputType, ExecutableTuple, get_chunk_types, get_tileable_types, get_output_types, get_fetch_class
label_desc: Use image node_id 2 for calling a global function with example usage: estimate_size(results, op) and returns: size_estimator, size_estimator