code: def check_duplicated_arguments(stage):
      from collections import Counter
  
      from dvc.exceptions import ArgumentDuplicationError
  
      path_counts = Counter(
          edge.fs_path for edge in stage.deps + stage.outs
      )
  
      for path, occurrence in path_counts.items():
          if occurrence > 1:
              raise ArgumentDuplicationError(str(path))
  
imports: import os
  import pathlib
  from typing import TYPE_CHECKING, Any, Dict, List, Optional, Tuple, Union
  from funcy import concat, first, lsplit, rpartial
  from dvc.annotations import ANNOTATION_FIELDS
  from dvc.exceptions import InvalidArgumentError
  from dvc_data.hashfile.meta import Meta
  from .exceptions import MissingDataSource, StageExternalOutputsError, StagePathNotDirectoryError, StagePathNotFoundError, StagePathOutsideError
label_desc: Use image node_id 6 for calling a global function with example usage: check_duplicated_arguments(stage) without return types