def CreateInstance(self, instance_name, machine_type, boot_disk, disks=None,
                     startup_script='', service_accounts=None,
                     external_ip=True, metadata=None, tags=None,
                     can_ip_forward=False):
    params = {
        'kind': 'compute#instance',
        'name': instance_name,
        'zone': self._ResourceUrl('zones', self._zone,
                                  zoning=ResourceZoning.NONE),
        'machineType': self._ResourceUrl('machineTypes', machine_type),
        'disks': [
            {
                'kind': 'compute#attachedDisk',
                'boot': True,
                'source': self._ResourceUrl('disks', boot_disk),
                'mode': 'READ_WRITE',
                'type': 'PERSISTENT',
            },
        ],
        'metadata': {
            'kind': 'compute#metadata',
            'items': [
                {
                    'key': 'startup-script',
                    'value': startup_script,
                },
            ],
        },
        'canIpForward': can_ip_forward,
        'networkInterfaces': [
            {
                'kind': 'compute#instanceNetworkInterface',
                'accessConfigs': [],
                'network': self._ResourceUrl('networks', 'default',
                                             zoning=ResourceZoning.GLOBAL)
            },
        ],
        'serviceAccounts': [
            {
                'kind': 'compute#serviceAccount',
                'email': 'default',
                'scopes': service_accounts or [],
            },
        ],
    }

    # Attach extra disks.
    if disks:
      for disk in disks:
        params['disks'].append({
            'kind': 'compute#attachedDisk',
            'boot': False,
            'source': self._ResourceUrl('disks', disk),
            'deviceName': disk,
            'mode': 'READ_WRITE',
            'type': 'PERSISTENT',
        })

    # Request external IP address if necessary.
    if external_ip:
      params['networkInterfaces'][0]['accessConfigs'].append({
          'kind': 'compute#accessConfig',
          'type': 'ONE_TO_ONE_NAT',
          'name': 'External NAT',
      })

    # Add metadata.
    if metadata:
      for key, value in metadata.items():
        params['metadata']['items'].append({'key': key, 'value': value})

    # Add tags.
    if tags:
      params['tags'] = {'items': tags}

    operation = self.GetApi().instances().insert(
        project=self._project, zone=self._zone, body=params).execute()

    return self._ParseOperation(
        operation, 'Instance creation: %s' % instance_name)
Return true if the variable is odd.
dataset/ETHPy150Open GoogleCloudPlatform/solutions-google-compute-engine-cluster-for-hadoop/gce_api.py/GceApi.CreateInstance--crossover with--dataset/ETHPy150Open GeekTrainer/Flask/Work/Trivia - Module 5/env/Lib/site-packages/jinja2/tests.py/test_odd