code: def rpc(self, address, rpc_id):
          
  
          # Always allow mocking an RPC to override whatever the defaul behavior is
          if address in self.mock_rpcs and rpc_id in self.mock_rpcs[address]:
              value = self.mock_rpcs[address][rpc_id]
              return value
  
          result = self._call_rpc(address, rpc_id, bytes())
  
          if len(result) != 4:
              self.warn(u"RPC 0x%X on address %d: response had invalid length %d not equal to 4" % (rpc_id, address, len(result)))
  
          if len(result) < 4:
              raise HardwareError("Response from RPC was not long enough to parse as an integer", rpc_id=rpc_id, address=address, response_length=len(result))
  
          if len(result) > 4:
              result = result[:4]
  
          res, = struct.unpack("<L", result)
          return res
docs: Call an RPC and receive the result as an integer.
  
          If the RPC does not properly return a 32 bit integer, raise a warning
          unless it cannot be converted into an integer at all, in which case
          a HardwareError is thrown.
  
          Args:
              address (int): The address of the tile we want to call the RPC
                  on
              rpc_id (int): The id of the RPC that we want to call
  
          Returns:
              int: The result of the RPC call.  If the rpc did not succeed
                  an error is thrown instead.