parameters: (use_color, fmt_str, *args, **kwargs)
return_statement: return fmt_str.format(*args, **kwargs)
docstring: Return the result of 'fmt_str.format(*args, **kwargs)' after transforming
      'args' and 'kwargs' according to the value of 'use_color'. If 'use_color'
      is False then all color codes in 'args' and 'kwargs' are replaced with
      the empty string.
docstring_summary: Return the result of 'fmt_str.format(*args, **kwargs)' after transforming
      'args' and 'kwargs' according to the value of 'use_color'. If 'use_color'
      is False then all color codes in 'args' and 'kwargs' are replaced with
      the empty string.
docstring_tokens: Return the result of fmt_str . format ( * args ** kwargs ) after transforming args and kwargs according to the value of use_color . If use_color is False then all color codes in args and kwargs are replaced with the empty string .
function: def color_format(use_color, fmt_str, *args, **kwargs):
      """
      Return the result of 'fmt_str.format(*args, **kwargs)' after transforming
      'args' and 'kwargs' according to the value of 'use_color'. If 'use_color'
      is False then all color codes in 'args' and 'kwargs' are replaced with
      the empty string.
      """
      assert use_color is True or use_color is False
      if not use_color:
          args = [arg if not isinstance(arg, BenchmarkColor) else BC_NONE
                  for arg in args]
          kwargs = {key: arg if not isinstance(arg, BenchmarkColor) else BC_NONE
                    for key, arg in kwargs.items()}
      return fmt_str.format(*args, **kwargs)
function_tokens: def color_format ( use_color , fmt_str , * args , * * kwargs ) : assert use_color is True or use_color is False if not use_color : args = [ arg if not isinstance ( arg , BenchmarkColor ) else BC_NONE for arg in args ] kwargs = { key : arg if not isinstance ( arg , BenchmarkColor ) else BC_NONE for key , arg in kwargs . items ( ) } return fmt_str . format ( * args , * * kwargs )