code: def _convert_extras_requirements(
      extras_require: _StrOrIter,
  ) -> Mapping[str, _Ordered[Requirement]]:
      """
      Convert requirements in `extras_require` of the form
      `"extra": ["barbazquux; {marker}"]` to
      `"extra:{marker}": ["barbazquux"]`.
      """
      output: Mapping[str, _Ordered[Requirement]] = defaultdict(dict)
      for section, v in extras_require.items():
          # Do not strip empty sections.
          output[section]
          for r in _reqs.parse(v):
              output[section + _suffix_for(r)].setdefault(r)
  
      return output
  
file_path: catboost/contrib/python/setuptools/py3/setuptools/command/_requirestxt.py
imports: import io
  from collections import defaultdict
  from itertools import filterfalse
  from typing import Dict, List, Tuple, Mapping, TypeVar
  from ..None import _reqs
  from ..extern.jaraco.text import yield_lines
  from ..extern.packaging.requirements import Requirement
label_desc: Use image node_id 2 for calling a global function with example usage: _convert_extras_requirements(extras_require) and returns: output