code: function getActivity(activityId) {
    var activity = activities[activityId];
  
    if (activity === undefined) {
      throw new Error('activity with id "' + activityId + '" not found.');
    }
  
    return activity;
  }
docs: The Activity object.
  @typedef {{
  id: number,
  message: string,
  timestamps: Array.<number>
  }} Activity
   
  Get an Activity object if it exists. Throws if it doesn't exist.
  @param {number} activityId Activity id.
  @return {Activity}