code: def _generate_classes_and_scores(
      num_classes, n, seed=42, hard_predictions=False
  ):
      rs = np.random.RandomState(seed)
      t = rs.randint(num_classes, size=n)
      if hard_predictions:
          p = rs.randint(num_classes, size=n)
      else:
          p = rs.uniform(size=(n, num_classes))
          p /= p.sum(-1, keepdims=True)
          p = _round_scores(p)
      return t, p
  
imports: from __future__ import print_function
  from __future__ import division
  from __future__ import absolute_import
  import unittest
  import turicreate
  from turicreate.toolkits._main import ToolkitError
  import math
  from numpy import inf
  import numpy
label_desc: Use image node_id 2 for calling a global function with example usage: _generate_classes_and_scores(num_classes, n, seed, hard_predictions) and returns: t,  p