code: def write_memory(self, *, region_name: str, offset: int = 0, value=None):
          
          assert self.status in ['loaded', 'done']
  
          aref = ParameterAref(name=region_name, index=offset)
          self._variables_shim[aref] = value
  
          return self
docs: Writes a value into a memory region on the QAM at a specified offset.
  
          :param region_name: Name of the declared memory region on the QAM.
          :param offset: Integer offset into the memory region to write to.
          :param value: Value to store at the indicated location.