<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def pin_command(self):
 """Compose pip-compile shell command"""

        parts = [
            'pip-compile',
            '--no-header',
            '--verbose',
            '--rebuild',
            '--no-index',
            '--output-file', self.outfile,
            self.infile,
        ]
        if OPTIONS['upgrade']:
            parts.insert(3, '--upgrade')
        if self.add_hashes:
            parts.insert(1, '--generate-hashes')
        return parts