@classmethod
def _java_loader_class(cls, clazz):
    """
        Returns the full class name of the Java ML instance. The default
        implementation replaces "pyspark" by "org.apache.spark" in
        the Python full class name.
        """
    java_package = clazz.__module__.replace('pyspark', 'org.apache.spark')
    if clazz.__name__ in ('Pipeline', 'PipelineModel'):
        java_package = '.'.join(java_package.split('.')[0:-1])
    return java_package + '.' + clazz.__name__
