def METHOD_NAME(j_obj: jpy.JType) -> Union[JObjectWrapper, jpy.JType]:
    """ Wraps the specified Java object as an instance of a custom wrapper class if one is available, otherwise returns
    the raw Java object. """
    if j_obj is None:
        return None
    wc = _lookup_wrapped_class(j_obj)
    return wc(j_obj) if wc else j_obj