code: def get_extra_requires(path, add_all=True):
      import re
      from collections import defaultdict
  
      try:
          with open(path, encoding="utf-8") as fp:
              extra_deps = defaultdict(set)
              for k in fp:
                  if k.strip() and not k.startswith("#"):
                      tags = set()
                      if ":" in k:
                          k, v = k.split(":")
                          tags.update(vv.strip() for vv in v.split(","))
                      tags.add(re.split("[<=>]", k)[0])
                      for t in tags:
                          extra_deps[t].add(k)
  
              # add tag `all` at the end
              if add_all:
                  extra_deps["all"] = set(
                      vv for v in extra_deps.values() for vv in v
                  )
  
          return extra_deps
      except FileNotFoundError:
          return {}
  
file_path: jina/setup.py
imports: import os
  import subprocess
  import sys
  import platform
  from os import path
  from setuptools import Extension, find_packages, setup
  from setuptools.command.develop import develop
  from setuptools.command.egg_info import egg_info
  from setuptools.command.install import install
label_desc: Use image node_id 2 for calling a global function with example usage: get_extra_requires(path, add_all) and returns: extra_deps, dict