code: def get_size(
      file: str, disp_format: str = "bytes"
  ) -> Optional[float]:
      r"""
          Returns: the size of `file` in bytes/kb/mb/gb/tb
  
      Args:
          file (str): Filepath to check
          disp_format (str): Size format (bytes/kb/mb/gb/tb)
  
      Returns:
          size (str): File size in bytes/kb/mb/gb/tb
  
      """
  
      if not isinstance(disp_format, str):
          raise ValueError("display format must be a string")
  
      disp_format = disp_format.lower()
  
      if disp_format not in ["bytes", "kb", "mb", "gb", "tb"]:
          raise ValueError(
              "display format needs to be either bytes/kb/mb/gb/tb"
          )
  
      size = os.path.getsize(file)
  
      if disp_format == "bytes":
          return size
  
      if disp_format == "kb":
          return size * 1e-3
  
      if disp_format == "mb":
          return size * 1e-6
  
      if disp_format == "gb":
          return size * 1e-9
  
      if disp_format == "tb":
          return size * 1e-12
  
      return None
  
file_path: caer/caer/path/paths.py
imports: import os
  from time import time
  from ..annotations import List, Union, Optional, Tuple
label_desc: Use image node_id 14 for calling a global function with example usage: get_size(file, disp_format) and returns: None, size, unknown, unknown, unknown, unknown