code: def show_entries(entries, with_color=False, with_size=False):
      if with_color:
          ls_colors = LsColors()
          fmt = ls_colors.format
      else:
  
          def fmt(entry):
              return entry["path"]
  
      if with_size:
          ui.table([_format_entry(entry, fmt) for entry in entries])
          return
  
      # NOTE: this is faster than ui.table for very large number of entries
      ui.write("\n".join(fmt(entry) for entry in entries))
  
file_path: dvc/dvc/commands/ls/__init__.py
imports: from dvc.cli import completion, formatter
  from dvc.cli.command import CmdBaseNoRepo
  from dvc.cli.utils import DictAction, append_doc_link
  from dvc.commands.ls.ls_colors import LsColors
  from dvc.exceptions import DvcException
  from dvc.log import logger
  from dvc.ui import ui
label_desc: Use image node_id 2 for calling a global function with example usage: show_entries(entries, with_color, with_size) and returns: entry