this code gets uses depth to make 3d map for game, i need you to code it to make an extra map based of first  map that has textures, make the script adding this. then show fully updated code                                                                                    
import bpy
import numpy as np
from PIL import Image

def load_depth_map(path):
    img = Image.open(path)
    img = img.convert('L')  # Convert to grayscale
    return np.array(img)

def create_vertices(depth_data, depth_scale=10.0):
    height, width = depth_data.shape
    vertices = []
    for y in range(height):
        for x in range(width):
            z = depth_data[y, x] / 255.0 * depth_scale  # Adjust depth scale to enhance depth effect
            vertices.append((x / width * 2 - 1, y / height * 2 - 1, z))
    return vertices

def create_faces(height, width):
    faces = []
    for y in range(height - 1):
        for x in range(width - 1):
            a = y * width + x
            b = y * width + (x + 1)
            c = (y + 1) * width + (x + 1)
            d = (y + 1) * width + x
            faces.append((a, b, c, d))
    return faces

def create_mesh(name, vertices, faces):
    mesh = bpy.data.meshes.new(name)
    mesh.from_pydata(vertices, [], faces)
    mesh.update()
    return mesh

def create_object(mesh_name, obj_name, vertices, faces):
    mesh = create_mesh(mesh_name, vertices, faces)
    obj = bpy.data.objects.new(obj_name, mesh)
    bpy.context.collection.objects.link(obj)
    return obj

def main(depth_map_path):
    depth_data = load_depth_map(depth_map_path)
    vertices = create_vertices(depth_data)
    faces = create_faces(depth_data.shape[0], depth_data.shape[1])
    obj = create_object("DepthMapMesh", "DepthMapObj", vertices, faces)

    # Ensure the object is selected
    bpy.context.view_layer.objects.active = obj
    obj.select_set(True)

    # Switch to edit mode to calculate normals
    bpy.ops.object.mode_set(mode='EDIT')
    bpy.ops.mesh.normals_make_consistent(inside=False)
    bpy.ops.object.mode_set(mode='OBJECT')

    # Add UV mapping
    bpy.ops.object.mode_set(mode='EDIT')
    bpy.ops.uv.smart_project()
    bpy.ops.object.mode_set(mode='OBJECT')

    # Create a new material
    material = bpy.data.materials.new(name="DepthMapMaterial")
    material.use_nodes = True
    bsdf = material.node_tree.nodes["Principled BSDF"]

    # Assign the material to the object
    if obj.data.materials:
        obj.data.materials[0] = material
    else:
        obj.data.materials.append(material)

    # Optionally: Update 3D View to focus on the new mesh
    # Ensure this part only runs in a suitable context
    for area in bpy.context.screen.areas:
        if area.type == 'VIEW_3D':
            override = bpy.context.copy()
            override['area'] = area
            override['region'] = area.regions[-1]

            # Set the object's origin
            bpy.ops.object.origin_set(override, type='ORIGIN_GEOMETRY', center='BOUNDS')
            # Update view to focus on the object
            bpy.ops.view3d.view_all()

# Path to your depth map image
depth_map_path = r"C:\Users\Vusum\Downloads\Default_blue_flex_emotional_reflections_2.jpg"
main(depth_map_path)