code: def setLinkState(self, tlsID, tlsLinkIndex, state):
          
          fullState = list(self.getRedYellowGreenState(tlsID))
          if tlsLinkIndex >= len(fullState):
              raise TraCIException(None, None, "Invalid tlsLinkIndex %s for tls '%s' with maximum index %s." % (
                  tlsLinkIndex, tlsID, len(fullState) - 1))
          else:
              fullState[tlsLinkIndex] = state
              self.setRedYellowGreenState(tlsID, ''.join(fullState))
docs: setLinkState(string, string, int, string) -> None
          Sets the state for the given tls and link index. The state must be one
          of rRgGyYoOu for red, red-yellow, green, yellow, off, where lower case letters mean that the stream has to decelerate.
          The link index is shown the gui when setting the appropriate junctino
          visualization optin.