<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def samtools(items):
 """Ensure samtools has parallel processing required for piped analysis. """

    samtools = config_utils.get_program("samtools", items[0]["config"])
    p = subprocess.Popen([samtools, "sort", "-h"], stdout=subprocess.PIPE,
                         stderr=subprocess.PIPE)
    output, stderr = p.communicate()
    p.stdout.close()
    p.stderr.close()
    if str(output).find("-@") == -1 and str(stderr).find("-@") == -1:
        return ("Installed version of samtools sort does not have support for "
                "multithreading (-@ option) "
                "required to support bwa piped alignment and BAM merging. "
                "Please upgrade to the latest version "
                "from http://samtools.sourceforge.net/")