def to_scala_map(spark_session, d):
    """
    Convert a dict into a JVM Map.
    Args:
        spark_session: Spark session
        d: Python dictionary
    Returns:
        Scala map
    """
    return spark_session._jvm.PythonUtils.toScalaMap(d)