code: def HandleBlockReceived(self, inventory):
          
          block = IOHelper.AsSerializableWithType(inventory, 'neo.Core.Block.Block')
          if not block:
              return
  
          blockhash = block.Hash.ToBytes()
          try:
              if blockhash in BC.Default().BlockRequests:
                  BC.Default().BlockRequests.remove(blockhash)
          except KeyError:
              pass
          try:
              if blockhash in self.myblockrequests:
                  # logger.debug(f"{self.prefix} received block: {block.Index}")
                  self.heart_beat(HEARTBEAT_BLOCKS)
                  self.myblockrequests.remove(blockhash)
          except KeyError:
              pass
          self.leader.InventoryReceived(block)
docs: Process a Block inventory payload.
  
          Args:
              inventory (neo.Network.Inventory):