Getting the actual (not default) input value of a node group for a specific user I've spent far too long googling for this answer. :) 

I have a Cycles shader node group called ProteinVR that I created using the node editor. It has two inputs: 

This same node group is used by multiple users (i.e., different objects in the scene use the same node group to generate their materials), but with different inputs. So a different object might look like this: 

I then load the scene from the command line like this: 

/my/blender/exec/blender -b /my/blender/file.blend -P /my/blender/script.py

Within the /my/blender/script.py file, I want to be able to determine the input values (color or glossiness) of the node group for each user (object). I've found how to access the node group itself and explore its structure and default values programmatically, but I can't get the specific values being used for each user/object.

Any help you could offer would be most appreciated! First question on stack exchange... hope it goes well. :)

P.S. Blender 2.78, in case it's helpful.
import bpy

# get the object
ob = bpy.data.objects.get("NAME")

# get the material in 1st material slot
if ob and ob.data.materials:
    mat = ob.data.materials[0]

    # get the material nodes
    nodes = mat.node_tree.nodes

    # get the instance of the node_group by name of the node (not label, name)
    protein_vr = nodes.get("ProteinVR")
    # if there are multiple instances in one material, others will likely be ProteinVR.001, ProteinVR.002, etc..

    # get the inputs if node exists
    if protein_vr:
        color = protein_vr.inputs[0].default_value
        gloss = protein_vr.inputs[1].default_value
        print(color[:])
        print(gloss)


I compiled the answer from these 2, there is more in them:


Control Cycles material nodes and material properties in Python
How to assign a new material to an object in the scene from Python?