code: def replace_impl(context, builder, sig, args):
      src_ptr = builder.alloca(args[0].type)
      to_replace_ptr = builder.alloca(args[1].type)
      replacement_ptr = builder.alloca(args[2].type)
  
      builder.store(args[0], src_ptr)
      builder.store(args[1], to_replace_ptr),
      builder.store(args[2], replacement_ptr)
  
      udf_str_ptr = builder.alloca(
          default_manager[udf_string].get_value_type()
      )
  
      _ = context.compile_internal(
          builder,
          call_string_view_replace,
          types.void(
              _UDF_STRING_PTR,
              _STR_VIEW_PTR,
              _STR_VIEW_PTR,
              _STR_VIEW_PTR,
          ),
          (udf_str_ptr, src_ptr, to_replace_ptr, replacement_ptr),
      )
  
      result = cgutils.create_struct_proxy(udf_string)(
          context, builder, value=builder.load(udf_str_ptr)
      )
      return result._getvalue()
  
imports: import operator
  from functools import partial
  from numba import cuda, types
  from numba.core import cgutils
  from numba.core.datamodel import default_manager
  from numba.core.typing import signature
  from numba.cuda.cudaimpl import lower, registry
  from cudf._lib.strings_udf import get_character_cases_table_ptr, get_character_flags_table_ptr, get_special_case_mapping_table_ptr
  from cudf.core.udf.masked_typing import MaskedType
  from cudf.core.udf.strings_typing import size_type, string_view, udf_string
label_desc: Use image node_id 14 for calling a global function with example usage: replace_impl(context, builder, sig, args) and returns: result