code: def check_data(labels, data, args):
      
      len_categories = len(data[0])
  
      # Check that there are data for all labels.
      if len(labels) != len(data):
          print(">> Error: Label and data array sizes don't match")
          sys.exit(1)
  
      # Check that there are data for all categories per label.
      for dat in data:
          if len(dat) != len_categories:
              print(">> Error: There are missing values")
              sys.exit(1)
  
      colors = []
  
      # If user inserts colors, they should be as many as the categories.
      if args['color'] is not None:
          if len(args['color']) != len_categories:
              print(">> Error: Color and category array sizes don't match")
              sys.exit(1)
  
          for color in args['color']:
              colors.append(AVAILABLE_COLORS.get(color))
  
      # Vertical graph for multiple series of same scale is not supported yet.
      if args['vertical'] and len_categories > 1 and not args['different_scale']:
          print(">> Error: Vertical graph for multiple series of same "
                "scale is not supported yet.")
          sys.exit(1)
  
      # If user hasn't inserted colors, pick the first n colors
      # from the dict (n = number of categories).
      if args['stacked'] and not colors:
          colors = [v for v in list(AVAILABLE_COLORS.values())[:len_categories]]
  
      return colors
docs: Check that all data were inserted correctly. Return the colors.