class_docstr: Test the count bucket resampler.
class_docstr_tok: ["Test","the","count","bucket","resampler","."]
docstr: Compute the mocked bucket count.
code: def _compute_mocked_bucket_count(
      self, data, return_data=None, **kwargs
  ):
      """Compute the mocked bucket count."""
      self.bucket.resampler = mock.MagicMock()
      if return_data is not None:
          self.bucket.resampler.get_count.return_value = return_data
      else:
          self.bucket.resampler.get_count.return_value = data
      res = self.bucket.compute(data, **kwargs)
      return res
  
imports: import os
  import shutil
  import tempfile
  import unittest
  from unittest import mock
  import dask.array
  import numpy
  import pytest
  import xarray
  from pyproj import CRS
  from satpy.resample import NativeResampler
label_desc: Use image node_id 2 for calling the TestBucketCount obj's underlying member method code with example usage: obj._compute_mocked_bucket_count(data, return_data) and returns: res