Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def register_spark():
"""
Register spark backend into joblib.
"""
try:
from .backend import register # pylint: disable=C0415
register()
except ImportError:
msg = ("To use the spark.distributed backend you must install "
"the pyspark and packages.\n\n")
raise ImportError(msg)