code: def local_script_dir(script_sdir):
      """Get local script directory if running in development dir, else None"""
      # Check for presence of scripts in development directory.  ``realpath``
      # allows for the situation where the development directory has been linked
      # into the path.
      package_path = dirname(__import__(MY_PACKAGE).__file__)
      above_us = realpath(pjoin(package_path, ".."))
      devel_script_dir = pjoin(above_us, script_sdir)
      if isfile(pjoin(above_us, "setup.py")) and isdir(
          devel_script_dir
      ):
          return devel_script_dir
      return None
  
file_path: dipy/dipy/tests/scriptrunner.py
imports: import sys
  import os
  from os.path import dirname, join, isfile, isdir, realpath, pathsep
  from subprocess import Popen, PIPE
label_desc: Use image node_id 2 for calling a global function with example usage: local_script_dir(script_sdir) and returns: None, devel_script_dir