<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def func_factory(p, method: str) -> callable: """ Dynamically generates callback commands to correlate to provider public methods :param p: A :class:`notifiers.core.Provider` object :param method: A string correlating to a provider method :return: A callback func """


    def callback(pretty: bool = False):
        res = getattr(p, method)
        dump = partial(json.dumps, indent=4) if pretty else partial(json.dumps)
        click.echo(dump(res))

    return callback