code: def choose_requirement(mains, secondary):
      """If some version of main requirement installed, return main,
      else return secondary.
  
      """
      chosen = secondary
      for main in mains:
          try:
              name = re.split(r"[!<>=]", main)[0]
              get_distribution(name)
              chosen = main
              break
          except DistributionNotFound:
              pass
  
      return str(chosen)
  
file_path: albumentations/setup.py
imports: import io
  import os
  import re
  from pkg_resources import DistributionNotFound, get_distribution
  from setuptools import find_packages, setup
label_desc: Use image node_id 3 for calling a global function with example usage: choose_requirement(mains, secondary) and returns: str