code: def test_colorbar_max_labels(self):
      import re
  
      # linear
      m = self.world.explore("pop_est", legend_kwds={"max_labels": 3})
      out_str = self._fetch_map_string(m)
      tick_str = re.search(
          r"tickValues\(\[[\',\,\.,0-9]*\]\)", out_str
      ).group(0)
      assert (
          tick_str.replace(",''", "")
          == "tickValues([140.0,471386328.07843137,942772516.1568627])"
      )
  
      # scheme
      m = self.world.explore(
          "pop_est",
          scheme="headtailbreaks",
          legend_kwds={"max_labels": 3},
      )
      out_str = self._fetch_map_string(m)
      assert (
          "tickValues([140.0,'',184117213.1818182,'',1382066377.0,''])"
          in out_str
      )
  
      # short cmap
      m = self.world.explore(
          "pop_est", legend_kwds={"max_labels": 3}, cmap="tab10"
      )
      out_str = self._fetch_map_string(m)
  
      tick_str = re.search(
          r"tickValues\(\[[\',\,\.,0-9]*\]\)", out_str
      ).group(0)
      assert (
          tick_str
          == "tickValues([140.0,'','','',559086084.0,'','','',1118172028.0,'','',''])"
      )
  
imports: import geopandas
  import numpy
  import pandas
  import pytest
  import shapely
  from packaging.version import Version
  from matplotlib import cm
  from matplotlib import colors
  from branca.colormap import StepColormap
label_desc: Use image node_id 24 for calling the TestExplore obj's underlying member method code with example usage: obj.test_colorbar_max_labels() without return types