def METHOD_NAME(to_replace):
    if to_replace is None:
        return None
    elif isinstance(to_replace, np.ndarray):
        return ctypes.pointer(to_replace.ctypes.data_as(ctypes.POINTER(ctypes.c_int32)))
    else:
        return to_replace.ctypes_pointer()