def _cast_make_object(canidate_class, cpp_object, is_class):
    """Make an object for cast"""
    if is_class:
        return canidate_class
    elif hasattr(canidate_class, '_convert_cpp'):
        return canidate_class._convert_cpp(cpp_object)
    else:
        return canidate_class(cpp_object)
