code: def _generate_binary_test_data():
      random = np.random.RandomState(1234)
  
      def generate_white_noise(length, sample_rate):
          loc = random.randint(300, 600)
          scale = random.randint(80, 130)
          size = int(length * sample_rate)
          data = random.normal(loc=loc, scale=scale, size=size).astype(
              "int16"
          )
          return {"sample_rate": sample_rate, "data": data}
  
      def generate_sine_wave(length, sample_rate):
          data = []
          volume = random.randint(500, 1500)
          freq = random.randint(300, 800)
          for x in range(int(length * sample_rate)):
              data.append(
                  volume
                  * math.sin(
                      2 * math.pi * freq * (x / float(sample_rate))
                  )
              )
          return {
              "sample_rate": sample_rate,
              "data": np.asarray(data, dtype="int16"),
          }
  
      white_noise = [
          generate_white_noise(3, 16000),
          generate_white_noise(5.1, 48000),
          generate_white_noise(1, 16500),
      ]
  
      sine_waves = [
          generate_sine_wave(3, 16000),
          generate_sine_wave(5.1, 48000),
          generate_sine_wave(1, 12000),
      ]
  
      data = tc.SFrame(
          {
              "audio": white_noise + sine_waves,
              "labels": ["white noise"] * len(white_noise)
              + ["sine wave"] * len(sine_waves),
          }
      )
      return data
  
imports: from __future__ import print_function
  from __future__ import division
  from __future__ import absolute_import
  from .util import TempDirectory
  from copy import copy
  import math
  from os import mkdir
  import unittest
  import pytest
  import numpy
  import sys
  import turicreate
  from turicreate.toolkits._internal_utils import _raise_error_if_not_sarray
  from turicreate.toolkits._main import ToolkitError
  from turicreate.toolkits._internal_utils import _mac_ver
label_desc: Use image node_id 1 for calling a global function with example usage: _generate_binary_test_data() and returns: data, dict, dict