def Read(self, length, dummy=None):
    """Stub Read method."""
    assert not self.closed
    data = self.expected_read_data.pop(0)
    if length < len(data):
      raise ValueError(
          'Overflow packet length. Read %d bytes, got %d bytes: %s',
          length, len(data), self._Dotify(data))
    return data
dataset/ETHPy150Open google/openhtf/openhtf/plugs/usb/usb_handle_stub.py/StubUsbHandle.Read/original