code: def division(
      x: int, y: int, method: str = "float"
  ) -> Union[int, float]:
      """
      :param x: dividend
      :param y: divisor
      :param method: {'float', 'nearest', 'ceil', 'floor'}
      """
      return METHOD_MAPPING[method.lower()](x, y)
  
imports: import copy
  import math
  from itertools import islice, product
  from typing import Dict, Iterable, Iterator, List, Optional, Tuple, Union
  import warnings
  import matplotlib.font_manager
  from matplotlib.axes import Axes
  from matplotlib.figure import Figure
  from matplotlib.patches import Patch, Rectangle
  from matplotlib.pyplot import cm
label_desc: Use image node_id 1 for calling a global function with example usage: division(x, y, method) and returns: METHOD_MAPPING