whole_func_string: function doRemoveDatasetClientWithRecords(datasetClientId, cb) {
    debug('doRemoveDatasetClientWithRecords datasetClientId = %s',  datasetClientId);
    async.waterfall([
      async.apply(doReadDatasetClient, datasetClientId),
      function removeRefs(datasetClientJson, next) {
        var datasetId = datasetClientJson.datasetId;
        var recordsCollection = mongoClient.collection(getDatasetRecordsCollectionName(datasetId));
        recordsCollection.updateMany({'refs': datasetClientId}, {'$pull': {'refs': datasetClientId}}, function(err) {
          return next(err, datasetClientJson);
        });
      },
      function deleteDatasetClient(datasetClientJson, next) {
        var col = mongoClient.collection(DATASETCLIENTS_COLLECTION);
        col.findOneAndDelete({'id': datasetClientId}, next);
      }
    ], function(err, result) {
      if (err) {
        debug('Failed to doRemoveDatasetClientWithRecords due to error %s', err);
        return cb(err);
      } else {
        return cb(null, result && result.value);
      }
    });
  }
func_code_string: function doRemoveDatasetClientWithRecords(datasetClientId, cb) {
    debug('doRemoveDatasetClientWithRecords datasetClientId = %s',  datasetClientId);
    async.waterfall([
      async.apply(doReadDatasetClient, datasetClientId),
      function removeRefs(datasetClientJson, next) {
        var datasetId = datasetClientJson.datasetId;
        var recordsCollection = mongoClient.collection(getDatasetRecordsCollectionName(datasetId));
        recordsCollection.updateMany({'refs': datasetClientId}, {'$pull': {'refs': datasetClientId}}, function(err) {
          return next(err, datasetClientJson);
        });
      },
      function deleteDatasetClient(datasetClientJson, next) {
        var col = mongoClient.collection(DATASETCLIENTS_COLLECTION);
        col.findOneAndDelete({'id': datasetClientId}, next);
      }
    ], function(err, result) {
      if (err) {
        debug('Failed to doRemoveDatasetClientWithRecords due to error %s', err);
        return cb(err);
      } else {
        return cb(null, result && result.value);
      }
    });
  }
func_documentation_string: Remove the datasetClient that matches the given datasetClientId, and also remove the references of the datasetClient from the records.
  @param {String} datasetClientId
  @param {Function} cb