code: def _get_viewport_details(data, lat_col_name, lon_col_name, zoom):
      """Auto-set viewport when not fully specified by user."""
      min_lat = data[lat_col_name].min()
      max_lat = data[lat_col_name].max()
      min_lon = data[lon_col_name].min()
      max_lon = data[lon_col_name].max()
      center_lat = (max_lat + min_lat) / 2.0
      center_lon = (max_lon + min_lon) / 2.0
      range_lon = abs(max_lon - min_lon)
      range_lat = abs(max_lat - min_lat)
  
      if zoom is None:
          if range_lon > range_lat:
              longitude_distance = range_lon
          else:
              longitude_distance = range_lat
          zoom = _get_zoom_level(longitude_distance)
  
      return zoom, center_lat, center_lon
  
imports: import copy
  import hashlib
  import json
  from typing import TYPE_CHECKING, Any, Collection, Dict, Iterable, Optional, Set, Tuple, Union, cast
  import pandas
  from typing_extensions import Final, TypeAlias
  import streamlit.elements.deck_gl_json_chart
  from streamlit import config, type_util
  from streamlit.color_util import Color, IntColorTuple, is_color_like, to_int_color_tuple
  from streamlit.errors import StreamlitAPIException
  from streamlit.proto.DeckGlJsonChart_pb2 import DeckGlJsonChart
  from streamlit.runtime.metrics_util import gather_metrics
  from streamlit.util import HASHLIB_KWARGS
label_desc: Use image node_id 5 for calling a global function with example usage: _get_viewport_details(data, lat_col_name, lon_col_name, zoom) and returns: zoom,  center_lat,  center_lon