code: func MigrateFlags(action func(ctx *cli.Context) error) func(*cli.Context) error {
  	return func(ctx *cli.Context) error {
  		for _, name := range ctx.FlagNames() {
  			if ctx.IsSet(name) {
  				ctx.GlobalSet(name, ctx.String(name))
  			}
  		}
  		return action(ctx)
  	}
  }
docs: // MigrateFlags sets the global flag from a local flag when it's set.
  // This is a temporary function used for migrating old command/flags to the
  // new format.
  //
  // e.g. geth account new --keystore /tmp/mykeystore --lightkdf
  //
  // is equivalent after calling this method with:
  //
  // geth --keystore /tmp/mykeystore --lightkdf account new
  //
  // This allows the use of the existing configuration functionality.
  // When all flags are migrated this function can be removed and the existing
  // configuration functionality must be changed that is uses local flags