code: def _expand_target_path(from_path, to_path):
      if os.path.isdir(to_path):
          return os.path.join(to_path, os.path.basename(from_path))
      return to_path
  
imports: import os
  from dvc.exceptions import MoveNotDataSourceError
  from dvc.repo.scm_context import scm_context
  from .None import locked
label_desc: Use image node_id 1 for calling a global function with example usage: _expand_target_path(from_path, to_path) and returns: to_path, os