whole_func_string: function lock(client, sequence) {
    const lastSequence = sequences.get(client.projectId);
  
    return Promise.resolve(lastSequence).then(() => {
      const result = sequence();
  
      sequences.set(client.projectId, result.then(noop, noop));
  
      return result;
    });
  }
func_code_string: function lock(client, sequence) {
    const lastSequence = sequences.get(client.projectId);
  
    return Promise.resolve(lastSequence).then(() => {
      const result = sequence();
  
      sequences.set(client.projectId, result.then(noop, noop));
  
      return result;
    });
  }
func_documentation_string: Run a sequence once the previous sequence for that project id ends.
  
  @param  {{projectId: string}}             client   Rest client
  @param  {function(): Promise<void,Error>} sequence Sequence to run
  @return {Promise<void,Error>}