code: def aggregate_last(
      samples: Sequence[Number], precision: int = 2
  ) -> Union[float, int]:
      if isinstance(samples[-1], int):
          return samples[-1]
      return round(samples[-1], precision)
  
imports: import sys
  from typing import Union
label_desc: Use image node_id 2 for calling a global function with example usage: aggregate_last(samples, precision) and returns: round, samples