def METHOD_NAME(hide_if_default=False):
    """Extends click option with extra functionality:
    * Records default value if coming from default_map in help (click does not)
    * Flag to hide options with default value (so that administrative option can be hidden)
    """
    class OptionExtended(click.Option):
        def get_help_record(self, ctx):
            self.show_default = True
            default_value = ctx.lookup_default(self.name)
            if default_value is not None:
                if hide_if_default:
                    self.hidden = True
                self.default = default_value
            return super().get_help_record(ctx)
    return OptionExtended