How to connect checker texture to a BSDF shader by python?

I am doing a simple script that would do few actions including creating material and assigning it to a selected face. Currently I am stuck with this problem. I get the material created but I cant figure how to connet that shadernodetexchecker to the base color slot of the material.

The code below shows how I create the material.

        material = bpy.data.materials.new(name="UV_checker_mat")
        material.use_nodes = True
        node.add_node(type="ShaderNodeTexChecker")

I would like to have end result like seen below so that the checker texture is added and it has a vector for UV map.
image

I think I figured

        material_output = material.node_tree.nodes.get('Material Output')
        principled_BSDF = material.node_tree.nodes.get('Principled BSDF')
        tex_node = material.node_tree.nodes.new('ShaderNodeTexChecker')
        vector_node = material.node_tree.nodes.new('ShaderNodeUVMap')
        material.node_tree.links.new(tex_node.outputs[0], principled_BSDF.inputs[0])
        material.node_tree.links.new(vector_node.outputs[0], tex_node.inputs[0])