code: def find_targets(
      targets: Union["StrOrBytesPath", Iterator["StrOrBytesPath"]],
      glob: bool = False,
  ) -> List[str]:
      if isinstance(targets, (str, bytes, os.PathLike)):
          targets_list = [os.fsdecode(targets)]
      else:
          targets_list = [os.fsdecode(target) for target in targets]
      return glob_targets(targets_list, glob=glob)
  
file_path: dvc/dvc/repo/add.py
imports: import os
  from contextlib import contextmanager
  from typing import TYPE_CHECKING, Dict, Iterator, List, NamedTuple, Optional, Tuple, Union
  from dvc.exceptions import CacheLinkError, DvcException, OutputDuplicationError, OutputNotFoundError, OverlappingOutputPathsError
  from dvc.repo.scm_context import scm_context
  from dvc.ui import ui
  from dvc.utils import glob_targets, resolve_output, resolve_paths
  from .None import locked
label_desc: Use image node_id 1 for calling a global function with example usage: find_targets(targets, glob) and returns: glob_targets