docs: def _update_throughput(self, tablename, read, write, index):
          """ Update the throughput on a table or index """
  
          def get_desc():
              """ Get the table or global index description """
              desc = self.describe(tablename, refresh=True, require=True)
              if index is not None:
                  return desc.global_indexes[index]
              return desc
  
          desc = get_desc()
  
          def num_or_star(value):
              """ Convert * to 0, otherwise resolve a number """
              return 0 if value == "*" else resolve(value)
  
          read = num_or_star(read)
          write = num_or_star(write)
          if read <= 0:
              read = desc.read_throughput
          if write <= 0:
              write = desc.write_throughput
  
          throughput = Throughput(read, write)
          kwargs = {}
          if index:
              kwargs["global_indexes"] = {index: throughput}
          else:
              kwargs["throughput"] = throughput
          self.connection.update_table(tablename, **kwargs)
          desc = get_desc()
          while desc.status == "UPDATING":  # pragma: no cover
              time.sleep(5)
              desc = get_desc()