code: def set_ref(self, ref, attr=None):
          
          ref_attr = '%s_refs' % ref.type.replace('-', '_')
          ref = {
              'to': ref.fq_name,
              'uuid': ref.uuid,
          }
          if ref_attr in self:
              self[ref_attr].append(ref)
          else:
              self[ref_attr] = [ref]
          return self
docs: Set reference to resource
  
          Can be used to set references on a resource
          that is not already created.
  
          :param ref: reference to add
          :type ref: Resource
  
          :rtype: Resource