code: def append_cast_op(i, o, prog):
      """
      Append a cast op in a given Program to cast input `i` to data type `o.dtype`.
      Args:
          i (Variable): The input Variable.
          o (Variable): The output Variable.
          prog (Program): The Program to append cast op.
      """
      prog.global_block().append_op(
          type="cast",
          inputs={"X": i},
          outputs={"Out": o},
          attrs={"in_dtype": i.dtype, "out_dtype": o.dtype},
      )
  
file_path: PGL/ogb_examples/linkproppred/ogbl-ppa/utils/fp16.py
imports: from __future__ import print_function
  import paddle
  import paddle.fluid
label_desc: Use image node_id 1 for calling a global function with example usage: append_cast_op(i, o, prog) without return types