<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _do_local(transactions, expected_signer, arguments):
 """ A transaction must be signed by the same key as the block. This rule takes a list of transaction indices in the block and enforces the rule on each. This rule is useful in combination with the other rules to ensure a client is not submitting transactions that should only be injected by the winning validator. """

    indices = arguments.split(",")
    txns_len = len(transactions)
    for index in indices:
        try:
            index = int(index.strip())
        except ValueError:
            LOGGER.warning("Ignore, local requries one or more comma "
                           "seperated integers that represent indices, not"
                           " %s", arguments)
            return True

        if abs(index) >= txns_len:
            LOGGER.debug("Ignore, Block does not have enough "
                         "transactions to validate this rule local:%s",
                         index)
            continue
        txn = transactions[index]
        header = TransactionHeader()
        header.ParseFromString(txn.header)

        if header.signer_public_key != expected_signer:
            LOGGER.debug("Transaction at postion %s was not signed by the"
                         " same key as the block.", index)
            return False
    return True