docs: function isStrictScope(scope, block, isMethodDefinition, useDirective) {
      var body, i, iz, stmt, expr;
  
      // When upper scope is exists and strict, inner scope is also strict.
      if (scope.upper && scope.upper.isStrict) {
          return true;
      }
  
      // ArrowFunctionExpression's scope is always strict scope.
      if (block.type === estraverse_estraverse.Syntax.ArrowFunctionExpression) {
          return true;
      }
  
      if (isMethodDefinition) {
          return true;
      }
  
      if (scope.type === 'class' || scope.type === 'module') {
          return true;
      }
  
      if (scope.type === 'block' || scope.type === 'switch') {
          return false;
      }
  
      if (scope.type === 'function') {
          if (block.type === estraverse_estraverse.Syntax.Program) {
              body = block;
          } else {
              body = block.body;
          }
      } else if (scope.type === 'global') {
          body = block;
      } else {
          return false;
      }
  
      // Search 'use strict' directive.
      if (useDirective) {
          for (i = 0, iz = body.body.length; i < iz; ++i) {
              stmt = body.body[i];
              if (stmt.type !== estraverse_estraverse.Syntax.DirectiveStatement) {
                  break;
              }
              if (stmt.raw === '"use strict"' || stmt.raw === '\'use strict\'') {
                  return true;
              }
          }
      } else {
          for (i = 0, iz = body.body.length; i < iz; ++i) {
              stmt = body.body[i];
              if (stmt.type !== estraverse_estraverse.Syntax.ExpressionStatement) {
                  break;
              }
              expr = stmt.expression;
              if (expr.type !== estraverse_estraverse.Syntax.Literal || typeof expr.value !== 'string') {
                  break;
              }
              if (expr.raw !== null) {
                  if (expr.raw === '"use strict"' || expr.raw === '\'use strict\'') {
                      return true;
                  }
              } else {
                  if (expr.value === 'use strict') {
                      return true;
                  }
              }
          }
      }
      return false;
  }