code: def _modify_opencv_cmake_rule(link_opencv):
      """Modify opencv_cmake rule to build the static opencv libraries."""
  
      # Ask the opencv_cmake rule to build the static opencv libraries for the
      # mediapipe python package. By doing this, we can avoid copying the opencv
      # .so file into the package.
      # On Windows, the opencv_cmake rule may need Visual Studio to compile OpenCV
      # from source. For simplicity, we continue to link the prebuilt version of
      # the OpenCV library through "@windows_opencv//:opencv".
      if not link_opencv and not IS_WINDOWS:
          content = (
              open(MP_THIRD_PARTY_BUILD, "r")
              .read()
              .replace(
                  "OPENCV_SHARED_LIBS = True",
                  "OPENCV_SHARED_LIBS = False",
              )
          )
          shutil.move(
              MP_THIRD_PARTY_BUILD,
              _get_backup_file(MP_THIRD_PARTY_BUILD),
          )
          build_file = open(MP_THIRD_PARTY_BUILD, "w")
          build_file.write(content)
          build_file.close()
  
imports: import glob
  import os
  import platform
  import posixpath
  import re
  import shlex
  import shutil
  import subprocess
  import sys
  import setuptools
  from setuptools.command import build_ext
  from setuptools.command import build_py
  from setuptools.command import install
label_desc: Use image node_id 6 for calling a global function with example usage: _modify_opencv_cmake_rule(link_opencv) without return types