code: def new_or_modified(diff_results):
      """Filter diff result records to those for new or modified files."""
      for r in diff_results:
          if r.get("type") in ("file", "symlink") and r.get(
              "state"
          ) in ["added", "modified"]:
              r.pop("status", None)
              yield r
  
imports: import json
  import logging
  import os.path
  import re
  import sys
  from copy import copy
  from functools import partial
  from itertools import dropwhile
  from datalad.consts import PRE_INIT_COMMIT_SHA
  from datalad.core.local.run import _format_cmd_shorty, assume_ready_opt, format_command, run_command
  from datalad.distribution.dataset import EnsureDataset, datasetmethod, require_dataset
  from datalad.interface.base import Interface, build_doc, eval_results
  from datalad.interface.results import get_status_dict
  from datalad.interface.common_opts import jobs_opt
  from datalad.support.constraints import EnsureNone, EnsureStr
  from datalad.support.exceptions import CapturedException
  from datalad.support.json_py import load_stream
  from datalad.support.param import Parameter
label_desc: Use image node_id 10 for calling a global function with example usage: new_or_modified(diff_results) without return types