code: def create_gre_tunnel_mode(cls, name, local_endpoint, remote_endpoint,
                            policy_vpn, mtu=0, pmtu_discovery=True, ttl=0,
                            enabled=True, comment=None):
          
          json = {
              'name': name,
              'ttl': ttl,
              'mtu': mtu,
              'pmtu_discovery': pmtu_discovery,
              'tunnel_encryption': 'tunnel_mode',
              'tunnel_mode': 'gre',
              'enabled': enabled,
              'comment': comment,
              'rbvpn_tunnel_side_a': local_endpoint.data,
              'rbvpn_tunnel_side_b': remote_endpoint.data
          }
          if policy_vpn is None:
              json['tunnel_encryption'] = 'no_encryption'
          else:
              json['tunnel_mode_vpn_ref'] = policy_vpn.href
            
          try:
              return ElementCreator(cls, json)
          except CreateElementFailed as err:
              raise CreateVPNFailed(err)
docs: Create a GRE based tunnel mode route VPN. Tunnel mode GRE wraps the
          GRE tunnel in an IPSEC tunnel to provide encrypted end-to-end
          security. Therefore a policy based VPN is required to 'wrap' the
          GRE into IPSEC. 
          
          :param str name: name of VPN
          :param TunnelEndpoint local_endpoint: the local side endpoint for
              this VPN.
          :param TunnelEndpoint remote_endpoint: the remote side endpoint for
              this VPN.
          :param PolicyVPN policy_vpn: reference to a policy VPN
          :param TunnelMonitoringGroup monitoring_group: the group to place
              this VPN in for monitoring. (default: 'Uncategorized')
          :param int mtu: Set MTU for this VPN tunnel (default: 0)
          :param boolean pmtu_discovery: enable pmtu discovery (default: True)
          :param int ttl: ttl for connections on the VPN (default: 0)
          :param str comment: optional comment
          :raises CreateVPNFailed: failed to create the VPN with reason
          :rtype: RouteVPN