code: def meanm(lat, lon, ell: Ellipsoid = None, deg: bool = True) -> tuple:
      """
      Computes geographic mean for geographic points on an ellipsoid
  
      like Matlab meanm()
  
      Parameters
      ----------
      lat : sequence of float
          geodetic latitude (degrees)
      lon : sequence of float
          geodetic longitude (degrees)
      ell : Ellipsoid, optional
            reference ellipsoid
      deg : bool, optional
           degrees input/output  (False: radians in/out)
  
      Returns
      -------
      latbar, lonbar: float
          geographic mean latitude, longitude
      """
  
      if deg:
          lat, lon = radians(lat), radians(lon)
  
      lat = geodetic2authalic(lat, ell, deg=False)
  
      x, y, z = sph2cart(lon, lat, array(1.0))
      lonbar, latbar, _ = cart2sph(x.sum(), y.sum(), z.sum())
      latbar = authalic2geodetic(latbar, ell, deg=False)
  
      if deg:
          latbar, lonbar = degrees(latbar), degrees(lonbar)
      return latbar, lonbar
  
file_path: pymap3d/src/pymap3d/lox.py
imports: from __future__ import annotations
  from math import pi, tau
  from .None import rcurve, rsphere
  from .ellipsoid import Ellipsoid
  from .latitude import authalic2geodetic, geodetic2authalic, geodetic2isometric, geodetic2rectifying, rectifying2geodetic
  from .mathfun import atan2, cos, degrees, radians, sign, tan
  from .utils import cart2sph, sph2cart
label_desc: Use image node_id 6 for calling a global function with example usage: meanm(lat, lon, ell, deg) and returns: latbar,  lonbar