def METHOD_NAME(self,index,tag=""):
    if self.conn is None: 
        print("No connection to send results")
        return
    if index < len(self.states):
        if tag != "" and tag != self.states[index].typename:
            print("tags do not match", tag, " vs ", self.states[index].typename)
            return
        res = json.dumps(self.states[index].data)
        self.conn.send(res)
    else:
        print("non-existent index: ", index, " tag = ", tag)