code: def update_state_by_id(cls, state_id, state, **kwargs):
          
          kwargs['_return_http_data_only'] = True
          if kwargs.get('async'):
              return cls._update_state_by_id_with_http_info(state_id, state, **kwargs)
          else:
              (data) = cls._update_state_by_id_with_http_info(state_id, state, **kwargs)
              return data
docs: Update State
  
          Update attributes of State
          This method makes a synchronous HTTP request by default. To make an
          asynchronous HTTP request, please pass async=True
          >>> thread = api.update_state_by_id(state_id, state, async=True)
          >>> result = thread.get()
  
          :param async bool
          :param str state_id: ID of state to update. (required)
          :param State state: Attributes of state to update. (required)
          :return: State
                   If the method is called asynchronously,
                   returns the request thread.