import os
from fabric.api import *
from fabric.colors import red, green

def pear_detect(package):
    """
    Detect if a pear package is installed.
    """
    if which('pear'):
        pear_out = local('pear list -a', True)
        if pear_out.find(package) == -1:
            return False
        else:
            return True
    else:
        print(red('pear is not installed', True))
        return False

import os
from fabric.api import *
from fabric.colors import red, green
import shell

def pear_detect(package):
    """
    Detect if a pear package is installed.
    """
    if shell.which('pear'):
        pear_out = local('pear list -a', True)
        if pear_out.find(package) == -1:
            return False
        else:
            return True
    else:
        print(red('pear is not installed', True))
        return False

Add missing import for shell module
Add missing import for shell module

  import os
  from fabric.api import *
  from fabric.colors import red, green
+ import shell
  
  def pear_detect(package):
      """
      Detect if a pear package is installed.
      """
-     if which('pear'):
+     if shell.which('pear'):
          pear_out = local('pear list -a', True)
          if pear_out.find(package) == -1:
              return False
          else:
              return True
      else:
          print(red('pear is not installed', True))
          return False
  
Add missing import for shell module
## Code Before:
import os
from fabric.api import *
from fabric.colors import red, green

def pear_detect(package):
    """
    Detect if a pear package is installed.
    """
    if which('pear'):
        pear_out = local('pear list -a', True)
        if pear_out.find(package) == -1:
            return False
        else:
            return True
    else:
        print(red('pear is not installed', True))
        return False

## Instruction:
Add missing import for shell module
## Code After:
import os
from fabric.api import *
from fabric.colors import red, green
import shell

def pear_detect(package):
    """
    Detect if a pear package is installed.
    """
    if shell.which('pear'):
        pear_out = local('pear list -a', True)
        if pear_out.find(package) == -1:
            return False
        else:
            return True
    else:
        print(red('pear is not installed', True))
        return False
