code: function maxWireVersion(topologyOrServer) {
    if (topologyOrServer.ismaster) {
      return topologyOrServer.ismaster.maxWireVersion;
    }
  
    if (topologyOrServer.description) {
      return topologyOrServer.description.maxWireVersion;
    }
  
    return null;
  }
docs: A helper function for determining `maxWireVersion` between legacy and new topology
  instances
  
  @private
  @param {(Topology|Server)} topologyOrServer