code: def do_link(package, force=False, skip_list=None, local_path=None):
      if skip_list and package in skip_list:
          print(f"Skip creating symbolic link for {package}")
          return
      package_home = os.path.abspath(
          os.path.join(ray.__file__, f"../{package}")
      )
      # Infer local_path automatically.
      if local_path is None:
          local_path = f"../{package}"
      local_home = os.path.abspath(os.path.join(__file__, local_path))
      # If installed package dir does not exist, continue either way. We'll
      # remove it/create a link from there anyways.
      if not os.path.isdir(package_home) and not os.path.isfile(
          package_home
      ):
          print(f"{package_home} does not exist. Continuing to link.")
      # Make sure the path we are linking to does exist.
      assert os.path.exists(local_home), local_home
      # Confirm with user.
      if not force and not click.confirm(
          f"This will replace:\n  {package_home}\nwith "
          f"a symlink to:\n  {local_home}",
          default=True,
      ):
          return
  
      # Windows: Create directory junction.
      if os.name == "nt":
          try:
              shutil.rmtree(package_home)
          except FileNotFoundError:
              pass
          except OSError:
              os.remove(package_home)
  
          # create symlink for directory or file
          if os.path.isdir(local_home):
              subprocess.check_call(
                  ["mklink", "/J", package_home, local_home], shell=True
              )
          elif os.path.isfile(local_home):
              subprocess.check_call(
                  ["mklink", "/H", package_home, local_home], shell=True
              )
          else:
              print(
                  f"{local_home} is neither directory nor file. Link failed."
              )
  
      # Posix: Use `ln -s` to create softlink.
      else:
          sudo = []
          if not os.access(os.path.dirname(package_home), os.W_OK):
              print(
                  "You don't have write permission "
                  f"to {package_home}, using sudo:"
              )
              sudo = ["sudo"]
          print(
              f"Creating symbolic link from \n {local_home} to \n {package_home}"
          )
          subprocess.check_call(sudo + ["rm", "-rf", package_home])
          subprocess.check_call(
              sudo + ["ln", "-s", local_home, package_home]
          )
  
file_path: ray/python/ray/setup-dev.py
imports: import os
  import sys
  import argparse
  import click
  import shutil
  import subprocess
  import ray
label_desc: Use image node_id 1 for calling a global function with example usage: do_link(package, force, skip_list, local_path) without return types