code: def remove_doctest_and_docrunner_parameters(arg_string: str) -> str:
      """
      >>> # Setup
      >>> arg_string_with_parameter = __file__ + '::::::some docrunner parameter'
      >>> arg_string_without_parameter = __file__
  
      >>> # Test with and without docrunner parameters
      >>> assert remove_doctest_and_docrunner_parameters(arg_string_with_parameter) == __file__
      >>> assert remove_doctest_and_docrunner_parameters(arg_string_without_parameter) == __file__
      """
      path = arg_string.split("::", 1)[0]
      return path
  
file_path: neptune-client/src/neptune/vendor/lib_programname.py
imports: import pathlib
  import sys
  import __main__
label_desc: Use image node_id 5 for calling a global function with example usage: remove_doctest_and_docrunner_parameters(arg_string) and returns: path