code: def _create_batch(signer, transactions):
      
      txn_ids = [txn.header_signature for txn in transactions]
      batch_header = BatchHeader(
          signer_public_key=signer.get_public_key().as_hex(),
          transaction_ids=txn_ids).SerializeToString()
  
      return Batch(
          header=batch_header,
          header_signature=signer.sign(batch_header),
          transactions=transactions)
docs: Creates a batch from a list of transactions and a public key, and signs
      the resulting batch with the given signing key.
  
      Args:
          signer (:obj:`Signer`): The cryptographic signer
          transactions (list of `Transaction`): The transactions to add to the
              batch.
  
      Returns:
          `Batch`: The constructed and signed batch.