def METHOD_NAME(path, buffer_size):
  if (buffer_size is None):
    buffer_size = streambuf.default_buffer_size
  print("Buffer is %i bytes" % buffer_size)
  path = os.path.expanduser(path)
  input = open(path, 'r')
  inp_buf = streambuf(python_file_obj=input, buffer_size=buffer_size)
  ext.time_read(input.name, inp_buf)
  output = open("tmp_tst_python_streambuf", "w")
  out_buf = streambuf(python_file_obj=output, buffer_size=buffer_size)
  ext.time_write(output.name, out_buf)