code: def search(logdir, regex):
      """Search for tracebacks content.
  
      Search for traceback inside a folder of nipype crash log files that match
      a given regular expression.
  
      Examples:\n
      nipypecli search nipype/wd/log -r '.*subject123.*'
      """
      from .crash_files import iter_tracebacks
  
      for file, trace in iter_tracebacks(logdir):
          if regex.search(trace):
              click.echo("-" * len(file))
              click.echo(file)
              click.echo("-" * len(file))
              click.echo(trace)
  
file_path: nipype/nipype/scripts/cli.py
imports: import click
  from .instance import list_interfaces
  from .utils import CONTEXT_SETTINGS, UNKNOWN_OPTIONS, ExistingDirPath, ExistingFilePath, UnexistingFilePath, RegularExpression, PythonModule, check_not_none
  from ..None import __version__
label_desc: Use image node_id 2 for calling a global function with example usage: search(logdir, regex) without return types