def METHOD_NAME(h5_path, circle_path, h5_out_path):
    with open(circle_path, 'rb') as f:
        graph = circle.Model.GetRootAsModel(f.read(), 0).Subgraphs(0)
    input_tensor = graph.Tensors(graph.Inputs(0))
    input_names = [input_tensor.Name()]
    with h5py.File(h5_path, 'r') as hf:
        dset = hf['/value/0']
        arr = np.array(dset)
    if not np.issubdtype(arr.dtype,
                         np.float32) or input_tensor.Type() != circle.TensorType.UINT8:
        print("Not f32 to q8u")
        sys.exit(-1)
    # copied from python-tools/examples/pytorch_tutorial/main.py
    dtype = 'uint8'
    def _quantize_input0(data):
        qparam = graph.Tensors(graph.Inputs(0)).Quantization()
        rescaled_data = data / qparam.ScaleAsNumpy()[0] + qparam.ZeroPointAsNumpy()[0]
        return np.round(rescaled_data).clip(np.iinfo(dtype).min,
                                            np.iinfo(dtype).max).astype(dtype)
    qarr = _quantize_input0(arr)
    ensure_output_dir(h5_out_path)
    with h5py.File(h5_out_path, 'w') as hf:
        name_grp = hf.create_group("name")
        val_grp = hf.create_group("value")
        idx = 0
        val_grp.create_dataset(str(idx), data=qarr, dtype=h5dtypes[dtype])
        name_grp.attrs[str(idx)] = input_names[0]