code: def get_dirs_from_args(args):
      def is_option(x):
          return str(x).startswith("-")
  
      def get_file_part_from_node_id(x):
          return str(x).split("::")[0]
  
      def get_dir_from_path(path):
          if path.isdir():
              return path
          return py.path.local(path.dirname)
  
      # These look like paths but may not exist
      possible_paths = (
          py.path.local(get_file_part_from_node_id(arg))
          for arg in args
          if not is_option(arg)
      )
  
      return [
          get_dir_from_path(path)
          for path in possible_paths
          if path.exists()
      ]
  
file_path: catboost/contrib/python/pytest/py2/_pytest/config/findpaths.py
imports: import os
  import py
  from .exceptions import UsageError
  from _pytest.outcomes import fail
label_desc: Use image node_id 4 for calling a global function with example usage: get_dirs_from_args(args) and returns: unknown, str, str, py, path