<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def NewOutputModule(cls, name, output_mediator):
 """Creates a new output module object for the specified output format. Args: name (str):
 name of the output module. output_mediator (OutputMediator):
 output mediator. Returns: OutputModule: output module. Raises: KeyError: if there is no output class found with the supplied name. ValueError: if name is not a string. """

    output_class = cls.GetOutputClass(name)
    return output_class(output_mediator)