code: def print_error(text, color=True):
      """Prints error message
  
      Arguments
      ---------
      text : str
          Error message
      color : bool, optional
          Whether to print in colour.
      """
      if color and sys.stderr.isatty():
          sys.stderr.write("{}ERROR: {}{}\n".format(RED, text, END))
      else:
          sys.stderr.write("ERROR: {}\n".format(text))
  
file_path: mahotas/mahotas/features_cli.py
imports: import sys
  from os import path
  import numpy
  import mahotas
  import argparse
  from itertools import chain
label_desc: Use image node_id 1 for calling a global function with example usage: print_error(text, color) without return types