<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def cli_print(msg, color='', end=None, file=sys.stdout, logger=_LOG):
 """Print the message to file and also log it. This function is intended as a 'tee' mechanism to enable the CLI interface as a first-class citizen, while ensuring that everything the operator sees also has an analogous logging entry in the test record for later inspection. Args: msg: The message to print/log. color: Optional colorama color string to be applied to the message. You can concatenate colorama color strings together in order to get any set of effects you want. end: A custom line-ending string to print instead of newline. file: A file object to which the baracketed text will be written. Intended for use with CLI output file objects like sys.stdout. logger: A logger to use, or None to disable logging. """

  if logger:
    logger.debug('-> {}'.format(msg))
  if CLI_QUIET:
    return
  if end is None:
    end = _linesep_for_file(file)
  file.write('{color}{msg}{reset}{end}'.format(
      color=color, msg=msg, reset=colorama.Style.RESET_ALL, end=end))