code: def remove_stubs(packages: List[str]) -> List[str]:
      """Remove type stubs (:pep:`561`) from a list of packages.
  
      >>> remove_stubs(["a", "a.b", "a-stubs", "a-stubs.b.c", "b", "c-stubs"])
      ['a', 'a.b', 'b']
      """
      return [
          pkg
          for pkg in packages
          if not pkg.split(".")[0].endswith("-stubs")
      ]
  
imports: import itertools
  import os
  from fnmatch import fnmatchcase
  from glob import glob
  from pathlib import Path
  from typing import TYPE_CHECKING, Dict, Iterable, Iterator, List, Mapping, Optional, Tuple, Union
  import _distutils_hack.override
  from distutils import log
  from distutils.util import convert_path
label_desc: Use image node_id 4 for calling a global function with example usage: remove_stubs(packages) and returns: unknown