def METHOD_NAME(to_replace):
    if to_replace is None:
        return None
    if isinstance(to_replace, integral_types.MutableListString):
        return ctypes.cast(to_replace.val, ctypes.POINTER(ctypes.POINTER(ctypes.c_char)))
    elif isinstance(to_replace, integral_types.MutableString):
        return to_replace.cchar_p_p()
    elif isinstance(to_replace, integral_types.MutableListChar):
        return ctypes.pointer(to_replace.val)
    else:
        raise NotImplemented