code: def to_bytes(self):
      return bytes(self.data)
  
file_path: thinc/thinc/tests/layers/test_shim.py
imports: from typing import List
  from thinc.shims.shim import Shim
  from ..util import make_tempdir
label_desc: Use image node_id 2 for calling the MockShim obj's underlying member method code with example usage: obj.to_bytes() and returns: bytes