human
I wrote the below code

    INSTANCE_TYPES = {'m1.tiny': dict(id=2, name='m1.tiny', memory_mb=512, vcpus=1, vcpu_weight=None, root_gb=0, ephemeral_gb=10, flavorid=1, rxtx_factor=1.0, swap=0), 'm1.small': dict(id=5, name='m1.small', memory_mb=2048, vcpus=1, vcpu_weight=None, root_gb=20, ephemeral_gb=0, flavorid=2, rxtx_factor=1.0, swap=1024), 'm1.medium': dict(id=1, name='m1.medium', memory_mb=4096, vcpus=2, vcpu_weight=None, root_gb=40, ephemeral_gb=40, flavorid=3, rxtx_factor=1.0, swap=0), 'm1.large': dict(id=3, name='m1.large', memory_mb=8192, vcpus=4, vcpu_weight=None, root_gb=80, ephemeral_gb=80, flavorid=4, rxtx_factor=1.0, swap=0), 'm1.xlarge': dict(id=4, name='m1.xlarge', memory_mb=16384, vcpus=8, vcpu_weight=None, root_gb=160, ephemeral_gb=160, flavorid=5, rxtx_factor=1.0, swap=0)}
    flat_network_fields = {'id': 'fake_flat', 'bridge': 'xenbr0', 'label': 'fake_flat_network', 'netmask': '255.255.255.0', 'cidr_v6': 'fe80::a00:0/120', 'netmask_v6': '120', 'gateway': '10.0.0.1', 'gateway_v6': 'fe80::a00:1', 'broadcast': '10.0.0.255', 'dns': '10.0.0.2', 'ra_server': None, 'injected': injected}
    vlan_network_fields = {'id': 'fake_vlan', 'bridge': 'br111', 'label': 'fake_vlan_network', 'netmask': '255.255.255.0', 'cidr_v6': 'fe80::a00:0/120', 'netmask_v6': '120', 'gateway': '10.0.0.1', 'gateway_v6': 'fe80::a00:1', 'broadcast': '10.0.0.255', 'dns': '10.0.0.2', 'ra_server': None, 'vlan': 111, 'injected': False}
    fixed_ip_fields = {'address': '10.0.0.3', 'address_v6': 'fe80::a00:3', 'network_id': 'fake_flat'}
    def fake_instance_type_get_all(context, inactive=0, filters=None):
        return INSTANCE_TYPES.values()
    def fake_instance_type_get_by_name(context, name):
        return INSTANCE_TYPES[name]
    def fake_instance_type_get(context, id):
        for (name, inst_type) in INSTANCE_TYPES.iteritems():
            if (str(inst_type['id']) == str(id)):
                return inst_type
        return None
    def fake_network_get_all_by_instance(context, instance_id):
        if ((instance_id % 2) == 0):
           ...

What's a good function header?
 ... Here's a good function header?
assistant
#Here's a good function header.

def stub_out_db_instance_api(stubs, injected=True):