code: function transformMemberImports(j, root, importPath, targetPath) {
    // find member imports
    root.find(j.ImportDeclaration, { source: { value: importPath } }).forEach(importDeclaration => {
      const memberImportSpecifiers = importDeclaration.node.specifiers.filter(
        specifier => specifier.type === 'ImportSpecifier',
      );
      if (memberImportSpecifiers.length) {
        j(importDeclaration).replaceWith(() => {
          const importDeclarations = [];
          const assignmentExpressions = [];
  
          memberImportSpecifiers.forEach(memberSpecifier => {
            const { palette, hue } = colorAccent(memberSpecifier.imported.name);
            const colorModuleName = colorImportPath(palette);
            const modulePath = `${targetPath}/${colorModuleName}`;
            const colorIdentifier = j.identifier(colorModuleName);
  
            // import color module (if not already imported)
            if (importDeclarations.map(p => p.source.value).indexOf(modulePath) === -1) {
              importDeclarations.push(
                j.importDeclaration(
                  [j.importDefaultSpecifier(colorIdentifier)],
                  j.literal(modulePath),
                ),
              );
            }
  
            // conditional assignment expression
            if (hue || colorModuleName === 'common') {
              const property = hue || palette;
              assignmentExpressions.push(
                j.variableDeclaration('const', [
                  j.variableDeclarator(
                    j.identifier(memberSpecifier.local.name),
                    j.memberExpression(
                      colorIdentifier,
                      /^[_|a-z]/i.test(property) ? j.identifier(property) : j.literal(property),
                    ),
                  ),
                ]),
              );
            }
          });
  
          return importDeclarations.concat(assignmentExpressions);
        });
      }
    });
  }
docs: Replace all member imports.
  e.g. import { red, blue } from 'material-ui/styles/colors'
  @param {jscodeshift_api_object} j
  @param {jscodeshift_ast_object} root
  @param {string} importPath
  @param {string} targetPath