code: function is_ready(topics, k) {
          let count = 0;
          for (var t in topics) {
              if (topics[t].length > 0) {
                  count += 1;
              }
          }
          return count >= k;
      }
docs: Check at least *k* topics has at least one message.  Args: topics: Dictionary of which key is a topic and value is a list of messages. k: Condition parameter.  Returns: true if at least *k* topics has at least one message.