def sign_input_transactions(self, bundle, start_index):<EOL>
if not bundle.hash:<EOL><INDENT>raise with_context(<EOL>exc=ValueError('<STR_LIT>'),<EOL>context={<EOL>'<STR_LIT>': bundle,<EOL>'<STR_LIT>': self.key_index,<EOL>'<STR_LIT>': start_index,<EOL>},<EOL>)<EOL><DEDENT>from iota.crypto.signing import SignatureFragmentGenerator<EOL>signature_fragment_generator = (<EOL>SignatureFragmentGenerator(self, bundle.hash)<EOL>)<EOL>for j in range(self.security_level):<EOL><INDENT>try:<EOL><INDENT>txn = bundle[start_index + j]<EOL><DEDENT>except IndexError as e:<EOL><INDENT>raise with_context(<EOL>exc=e,<EOL>context={<EOL>'<STR_LIT>': bundle,<EOL>'<STR_LIT>': self.key_index,<EOL>'<STR_LIT>': start_index + j,<EOL>},<EOL>)<EOL><DEDENT>if txn.value > <NUM_LIT:0>:<EOL><INDENT>raise with_context(<EOL>exc=ValueError(<EOL>'<STR_LIT>'<EOL>'<STR_LIT>'.format(<EOL>i=txn.current_index,<EOL>value=txn.value,<EOL>),<EOL>),<EOL>context={<EOL>'<STR_LIT>': bundle,<EOL>'<STR_LIT>': self.key_index,<EOL>'<STR_LIT>': start_index,<EOL>},<EOL>)<EOL><DEDENT>if txn.signature_message_fragment:<EOL><INDENT>raise with_context(<EOL>exc=ValueError(<EOL>'<STR_LIT>'<EOL>'<STR_LIT>'<EOL>'<STR_LIT>'.format(<EOL>i=txn.current_index,<EOL>),<EOL>),<EOL>context={<EOL>'<STR_LIT>': bundle,<EOL>'<STR_LIT>': self.key_index,<EOL>'<STR_LIT>': start_index,<EOL>},<EOL>)<EOL><DEDENT>txn.signature_message_fragment = next(signature_fragment_generator)<EOL><DEDENT>
Signs the inputs starting at the specified index.

:param bundle:
    The bundle that contains the input transactions to sign.

:param start_index:
    The index of the first input transaction.

    If necessary, the resulting signature will be split across
    subsequent transactions automatically.