code: def _testBitcast(self, x, datatype, shape):
      with test_util.use_gpu():
          tf_ans = array_ops.bitcast(x, datatype)
          out = self.evaluate(tf_ans)
          if sys.byteorder == "little":
              buff_after = memoryview(out).tobytes()
              buff_before = memoryview(x).tobytes()
          else:
              buff_after = memoryview(out.byteswap()).tobytes()
              buff_before = memoryview(x.byteswap()).tobytes()
          self.assertEqual(buff_before, buff_after)
          self.assertEqual(tf_ans.get_shape(), shape)
          self.assertEqual(tf_ans.dtype, datatype)
  
file_path: tensorflow/tensorflow/python/kernel_tests/array_ops/bitcast_op_test.py
imports: import sys
  import numpy
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import errors
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.platform import test
label_desc: Use image node_id 1 for calling the BitcastTest obj's underlying member method code with example usage: obj._testBitcast(x, datatype, shape) without return types