docstr: Flatten stage status, and filter empty stage status contents.
docstr_tok: ["Flatten","stage","status",",","and","filter","empty","stage","status","contents","."]
code: def _process_status(status: "DataStatus"):
      """Flatten stage status, and filter empty stage status contents."""
      for stage, stage_status in status.items():
          items = stage_status
          if isinstance(stage_status, dict):
              items = {
                  file: state
                  for state, files in stage_status.items()
                  for file in files
              }
          if not items:
              continue
          yield stage, items
  
file_path: dvc/dvc/commands/data.py
imports: from typing import TYPE_CHECKING
  from funcy import chunks, compact, log_durations
  from dvc.cli import formatter
  from dvc.cli.command import CmdBase
  from dvc.cli.utils import append_doc_link
  from dvc.log import logger
  from dvc.ui import ui
  from dvc.utils import colorize
label_desc: Use image node_id 1 for calling the CmdDataStatus obj's underlying member method code with example usage: obj._process_status(status) without return types