def METHOD_NAME(m) -> Dict[Any, Any]:
    """Converts a java map to a python dictionary."""
    if not m:
        return {}
    return {e.getKey(): wrap_j_object(e.getValue()) for e in m.entrySet().toArray()}