code: function getAvailableTopics(topicsInfo, allowedTopics) {
      const existentTopics = topicsInfo.map(
          e => e.name
      )
      .filter(t => t !== '__consumer_offsets');
  
      if (allowedTopics) {
          return existentTopics.filter(t => _.includes(allowedTopics, t));
      }
      else {
          return existentTopics;
      }
  }
docs: Return the intersection of existent topics and allowedTopics,
  or just all existent topics if allowedTopics is undefined.
  
  @param  {Array}  topicsInfo topic metadata object, _metadata.topics.
  @param  {Array}  allowedTopics topics allowed to be consumed.
  @return {Array}  available topics