code: def _init_config(self):
      remote_name = self._safe_name()
      remote_key = f"guild_{remote_name}"
      resource_group = {
          remote_key: {
              "name": f"guild-{remote_name}-rg",
              "location": self.region,
          }
      }
      vnet = {
          remote_key: {
              "name": f"guild-{remote_name}-vnet",
              "address_space": ["10.0.0.0/16"],
              "location": self.region,
              "resource_group_name": f"${{azurerm_resource_group.{remote_key}.name}}",
          }
      }
      subnet = {
          remote_key: {
              "name": f"guild-{remote_name}-subnet",
              "resource_group_name": f"${{azurerm_resource_group.{remote_key}.name}}",
              "virtual_network_name": (
                  f"${{azurerm_virtual_network.{remote_key}.name}}"
              ),
              "address_prefixes": ["10.0.1.0/24"],
          }
      }
      public_ip = {
          remote_key: {
              "name": f"guild-{remote_name}-public-ip",
              "location": self.region,
              "resource_group_name": f"${{azurerm_resource_group.{remote_key}.name}}",
              "allocation_method": "Static",
          }
      }
      nsg = {
          remote_key: {
              "name": f"guild-{remote_name}-nsg",
              "location": self.region,
              "resource_group_name": f"${{azurerm_resource_group.{remote_key}.name}}",
          }
      }
      nsr = {
          remote_key: {
              "name": "SSH",
              "priority": "1001",
              "direction": "Inbound",
              "access": "Allow",
              "protocol": "Tcp",
              "source_port_range": "*",
              "destination_port_range": "22",
              "source_address_prefix": "*",
              "destination_address_prefix": "*",
              "resource_group_name": f"${{azurerm_resource_group.{remote_key}.name}}",
              "network_security_group_name": (
                  f"${{azurerm_network_security_group.{remote_key}.name}}"
              ),
          }
      }
      nic = {
          remote_key: {
              "name": f"guild-{remote_name}-nic",
              "location": self.region,
              "resource_group_name": f"${{azurerm_resource_group.{remote_key}.name}}",
              "ip_configuration": {
                  "name": f"guild-{remote_name}-nicconf",
                  "subnet_id": f"${{azurerm_subnet.{remote_key}.id}}",
                  "private_ip_address_allocation": "dynamic",
                  "public_ip_address_id": f"${{azurerm_public_ip.{remote_key}.id}}",
              },
          }
      }
      if "id" in self.image:
          image_reference = {"id": self.image["id"]}
      elif "urn" in self.image:
          urn = self.image["urn"].split(":")
          image_reference = {
              "publisher": urn[0],
              "offer": urn[1],
              "sku": urn[2],
              "version": urn[3],
          }
      else:
          image_reference = {
              "publisher": self.image["publisher"],
              "offer": self.image["offer"],
              "sku": self.image["sku"],
          }
          if self.image["version"]:
              image_reference["version"] = self.image["version"]
      if self.disk_type:
          disk_type = self.disk_type
      else:
          disk_type = "Premium_LRS"
      instance = {
          remote_key: {
              "name": f"guild-{remote_name}-vm",
              "location": self.region,
              "resource_group_name": f"${{azurerm_resource_group.{remote_key}.name}}",
              "network_interface_ids": [
                  f"${{azurerm_network_interface.{remote_key}.id}}"
              ],
              "vm_size": self.instance_type,
              "storage_os_disk": {
                  "name": f"guild-{remote_name}-osdisk",
                  "caching": "ReadWrite",
                  "create_option": "FromImage",
                  "managed_disk_type": disk_type,
              },
              "storage_image_reference": image_reference,
              "os_profile": {
                  "computer_name": f"guild-{remote_name}-vm",
                  "admin_username": "",
              },
              "os_profile_linux_config": {
                  "disable_password_authentication": "true",
                  "ssh_keys": {},
              },
          }
      }
      if self.root_device_size:
          instance[remote_key]["storage_os_disk"][
              "disk_size_gb"
          ] = self.root_device_size
      output = {
          "host": {
              "value": f"${{azurerm_public_ip.{remote_key}.ip_address}}"
          }
      }
      config = {
          "provider": {"azurerm": {"features": {}}, "null": {}},
          "resource": {
              "azurerm_resource_group": resource_group,
              "azurerm_virtual_network": vnet,
              "azurerm_subnet": subnet,
              "azurerm_public_ip": public_ip,
              "azurerm_network_security_group": nsg,
              "azurerm_network_security_rule": nsr,
              "azurerm_network_interface": nic,
              "azurerm_virtual_machine": instance,
          },
          "output": output,
      }
      if not self.user:
          self.user = util.user()
          config["resource"]["azurerm_virtual_machine"][remote_key][
              "os_profile"
          ]["admin_username"] = self.user
      public_key = self._public_key()
      config["resource"]["azurerm_virtual_machine"][remote_key][
          "os_profile_linux_config"
      ]["ssh_keys"]["key_data"] = public_key
      config["resource"]["azurerm_virtual_machine"][remote_key][
          "os_profile_linux_config"
      ]["ssh_keys"]["path"] = f"/home/{self.user}/.ssh/authorized_keys"
      init_script = self._init_script()
      if init_script:
          init_script_path = self._write_init_script(init_script)
          connection = {
              "type": "ssh",
              "host": f"${{azurerm_public_ip.{remote_key}.ip_address}}",
          }
          if self.init_timeout:
              if isinstance(self.init_timeout, int):
                  connection["timeout"] = f"{self.init_timeout}m"
              else:
                  connection["timeout"] = self.init_timeout
          if self.private_key:
              private_key_path = remote_util.config_path(
                  self.private_key
              )
              connection[
                  "private_key"
              ] = f'${{file("{private_key_path}")}}'
          connection["user"] = self.user
          config["resource"]["null_resource"] = {
              f"{remote_key}_init": {
                  "triggers": {
                      "cluster_instance_ids": (
                          f"${{azurerm_virtual_machine.{remote_key}.id}}"
                      )
                  },
                  "connection": connection,
                  "provisioner": [
                      {"remote-exec": {"script": init_script_path}}
                  ],
              }
          }
      return config
  
imports: import json
  import logging
  import os
  import re
  import subprocess
  import sys
  from guild import remote
  from guild import remote_util
  from guild import util
  from guild import var
  from .None import ssh
  from .None import ssh_util
label_desc: Use image node_id 19 for calling the AzureVMRemote obj's underlying member method code with example usage: obj._init_config() and returns: config