code: def test_savefig_tight():
      nx, ny = 36, 18
      xbnds = np.linspace(0, 360, nx, endpoint=True)
      ybnds = np.linspace(-90, 90, ny, endpoint=True)
  
      x, y = np.meshgrid(xbnds, ybnds)
      data = np.exp(np.sin(np.deg2rad(x)) + np.cos(np.deg2rad(y)))
      data = data[:-1, :-1]
  
      ax = plt.subplot(2, 1, 1, projection=ccrs.Robinson())
      ax.pcolormesh(xbnds, ybnds, data, transform=ccrs.PlateCarree())
      buf = io.BytesIO()
      plt.savefig(buf, format="png", bbox_inches="tight")
  
file_path: cartopy/lib/cartopy/tests/mpl/test_pseudo_color.py
imports: import io
  from unittest import mock
  import matplotlib.pyplot
  import numpy
  import cartopy.crs
label_desc: Use image node_id 3 for calling a global function with example usage: test_savefig_tight() without return types