code: def write(self, data):
      if self.encoding:
          data = data.encode(self.encoding, "replace")
      self._writemethod(data)
  
imports: import sys, os, unicodedata
  import py
  from py.builtin import text, bytes
label_desc: Use image node_id 2 for calling the WriteFile obj's underlying member method code with example usage: obj.write(data) without return types