code: function isInLoop(path) {
    const loopOrFunctionParent = path.find(
      path => path.isLoop() || path.isFunction(),
    );
  
    return loopOrFunctionParent && loopOrFunctionParent.isLoop();
  }
docs: If there is a loop ancestor closer than the closest function, we
  consider ourselves to be in a loop.