<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_index(self, bam_file):
 """Index a bam file."""

        cmd = self.tools.samtools + " index {0}".format(bam_file)
        return cmd