class_docstr: Tests whether casting an element will faithfully copy data and
  parameters. Important to check for elements where data is not all
  held on .data attribute, e.g. Image bounds or Graph nodes and
  edgepaths.
class_docstr_tok: ["Tests","whether","casting","an","element","will","faithfully","copy","data","and","parameters",".","Important","to","check","for","elements","where","data","is","not","all","held","on",".data","attribute",",","e.g",".","Image","bounds","or","Graph","nodes","and","edgepaths","."]
code: def test_image_casting(self):
      img = Image([], bounds=2)
      self.assertEqual(img, Image(img))
  
imports: import numpy
  import pandas
  import param
  from holoviews import RGB, Annotation, Area, Bars, BoxWhisker, Contours, Curve, Dataset, Dimension, Div, Element, ErrorBars, Graph, HeatMap, Histogram, Image, Path, Points, Polygons, QuadMesh, Raster, Scatter, Spikes, Tiles, TriMesh, VectorField
  from holoviews.element.comparison import ComparisonTestCase
  from holoviews.element.path import BaseShape
label_desc: Use image node_id 1 for calling the ElementCastingTests obj's underlying member method code with example usage: obj.test_image_casting() without return types