code: def write_text(self, contents, encoding=None, errors=None):
      if not encoding:
          encoding = locale.getpreferredencoding(False)
      assert errors is None
      self.write_bytes(contents.encode(encoding))
  
imports: import locale
  import pathlib
  from abc import ABC, abstractmethod
label_desc: Use image node_id 5 for calling the Cloud obj's underlying member method code with example usage: obj.write_text(contents, encoding, errors) without return types