code: def write_attr(self, name, val, raw=False):
      if not raw:
          val = yaml_util.encode_yaml(val, strict=True)
      with open(self._attr_path(name), "w") as f:
          f.write(val)
          f.write(os.linesep)
          f.close()
  
imports: import os
  import random
  import threading
  import time
  import uuid
  import yaml
  from guild import opref
  from guild import util
  from guild import yaml_util
label_desc: Use image node_id 29 for calling the Run obj's underlying member method code with example usage: obj.write_attr(name, val, raw) without return types