code: def _format_number(self, x):
      if isinstance(x, int):
          s = "{x:<{s}}".format(
              x=x,
              s=self._default_cell_size,
          )
      else:
          s = "{x:<{s}.{p}}".format(
              x=x,
              s=self._default_cell_size,
              p=self._default_precision,
          )
  
      if len(s) > self._default_cell_size:
          if "." in s:
              return s[: self._default_cell_size]
          else:
              return s[: self._default_cell_size - 3] + "..."
      return s
  
imports: from __future__ import print_function
  import os
  import json
  import warnings
  from pathlib import Path
  from .observer import _Tracker
  from .event import Events
  from .util import Colours
label_desc: Use image node_id 5 for calling the ScreenLogger obj's underlying member method code with example usage: obj._format_number(x) and returns: s, s, unknown