transformModule(tree) {
    let statements = [];
    for (let i = 0; i < tree.scriptItemList.length; i++) {
      let item = tree.scriptItemList[i];
      switch (item.type) {
        case IMPORT_DECLARATION: {
          let transformed = this.transformAny(item);
          if (transformed.type === ANON_BLOCK) {
            statements.push(...transformed.statements);
          } else {
            statements.push(transformed);
          }
          break;
        }

        default:
          statements.push(item);
      }
    }
    return new Module(tree.location, statements, tree.moduleName);
  }
Normalizes import declarations to a simpler form. This is so that the
ModuleTransformer only has to handle the basic import declarations.