parameters: (asset, vis_params)
docstring: Gets the map id associated with an EE asset and its vis params.
docstring_summary: Gets the map id associated with an EE asset and its vis params.
docstring_tokens: Gets the map id associated with an EE asset and its vis params .
function: def _get_map_id_threadsafe(asset, vis_params):
    """Gets the map id associated with an EE asset and its vis params."""
    key = json.dumps({"asset": str(asset), "vis_params": vis_params})
    with _get_lock(_map_id_lock_dict_lock, _map_id_locks, key):
      with _map_id_ttl_cache_lock:
        if key in _map_id_ttl_cache:
          return _map_id_ttl_cache[key]
      mapid = asset.getMapId(vis_params=vis_params)
      with _map_id_ttl_cache_lock:
        _map_id_ttl_cache[key] = mapid
        return mapid
function_tokens: def _get_map_id_threadsafe ( asset , vis_params ) : key = json . dumps ( { "asset" : str ( asset ) , "vis_params" : vis_params } ) with _get_lock ( _map_id_lock_dict_lock , _map_id_locks , key ) : with _map_id_ttl_cache_lock : if key in _map_id_ttl_cache : return _map_id_ttl_cache [ key ] mapid = asset . getMapId ( vis_params = vis_params ) with _map_id_ttl_cache_lock : _map_id_ttl_cache [ key ] = mapid return mapid