class_docstr: Test CF writer with 'encoding' dataset attribute.
docstr: Create scene with a dataset providing the 'encoding' attribute.
docstr_tok: ["Create","scene","with","a","dataset","providing","the","'encoding","'","attribute","."]
code: def scene_with_encoding(self, scene, encoding):
      """Create scene with a dataset providing the 'encoding' attribute."""
      scene["test-array"].encoding = encoding["test-array"]
      return scene
  
imports: import os
  import tempfile
  import warnings
  from datetime import datetime
  import numpy
  import pytest
  import xarray
  from packaging.version import Version
  from satpy import Scene
  from satpy.tests.utils import make_dsq
  from satpy.writers.cf_writer import _get_backend_versions
label_desc: Use image node_id 1 for calling the TestEncodingAttribute obj's underlying member method code with example usage: obj.scene_with_encoding(scene, encoding) and returns: scene