def METHOD_NAME(term, color_env_var, color_flag):
  """Runs googletest-color-test_ and returns its exit code."""
  SetEnvVar('TERM', term)
  SetEnvVar(COLOR_ENV_VAR, color_env_var)
  if color_flag is None:
    args = []
  else:
    args = ['--%s=%s' % (COLOR_FLAG, color_flag)]
  p = gtest_test_utils.Subprocess([COMMAND] + args)
  return not p.exited or p.exit_code