code: def _set_extend(self, v, load=False):
      
      if hasattr(v, "_utype"):
        v = v._utype(v)
      try:
        t = YANGDynClass(v,base=extend.extend, is_container='container', presence=False, yang_name="extend", rest_name="extend", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions={u'tailf-common': {u'info': u'Configure layer2 domains to be extended towards\nthis site.'}}, namespace='urn:brocade.com:mgmt:brocade-tunnels', defining_module='brocade-tunnels', yang_type='container', is_config=True)
      except (TypeError, ValueError):
        raise ValueError({
            'error-string': """extend must be of a type compatible with container""",
            'defined-type': "container",
            'generated-type': """YANGDynClass(base=extend.extend, is_container='container', presence=False, yang_name="extend", rest_name="extend", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions={u'tailf-common': {u'info': u'Configure layer2 domains to be extended towards\nthis site.'}}, namespace='urn:brocade.com:mgmt:brocade-tunnels', defining_module='brocade-tunnels', yang_type='container', is_config=True)""",
          })
  
      self.__extend = t
      if hasattr(self, '_set'):
        self._set()
docs: Setter method for extend, mapped from YANG variable /overlay_gateway/site/extend (container)
      If this variable is read-only (config: false) in the
      source YANG file, then _set_extend is considered as a private
      method. Backends looking to populate this variable should
      do so via calling thisObj._set_extend() directly.
  
      YANG Description: This configuration represents the layer2 domains to
  be extended towards this site. In other words, it
  represents switchport VLANs on the tunnels to the
  site. VNI classification will be derived from 'map
  vlan' configuration on this overlay gateway.