code: def create_cube():
      """Generate vertices & indices for a filled and outlined cube
  
      Returns
      -------
      vertices : array
          Array of vertices suitable for use as a VertexBuffer.
      filled : array
          Indices to use to produce a filled cube.
      outline : array
          Indices to use to produce an outline of the cube.
      """
      vtype = [
          ("position", np.float32, 3),
          ("texcoord", np.float32, 2),
          ("normal", np.float32, 3),
          ("color", np.float32, 4),
      ]
      itype = np.uint32
  
      # Vertices positions
      p = np.array(
          [
              [1, 1, 1],
              [-1, 1, 1],
              [-1, -1, 1],
              [1, -1, 1],
              [1, -1, -1],
              [1, 1, -1],
              [-1, 1, -1],
              [-1, -1, -1],
          ]
      )
  
      # Face Normals
      n = np.array(
          [
              [0, 0, 1],
              [1, 0, 0],
              [0, 1, 0],
              [-1, 0, 0],
              [0, -1, 0],
              [0, 0, -1],
          ]
      )
  
      # Vertice colors
      c = np.array(
          [
              [1, 1, 1, 1],
              [0, 1, 1, 1],
              [0, 0, 1, 1],
              [1, 0, 1, 1],
              [1, 0, 0, 1],
              [1, 1, 0, 1],
              [0, 1, 0, 1],
              [0, 0, 0, 1],
          ]
      )
  
      # Texture coords
      t = np.array([[0, 0], [0, 1], [1, 1], [1, 0]])
  
      faces_p = [
          0,
          1,
          2,
          3,
          0,
          3,
          4,
          5,
          0,
          5,
          6,
          1,
          1,
          6,
          7,
          2,
          7,
          4,
          3,
          2,
          4,
          7,
          6,
          5,
      ]
      faces_c = [
          0,
          1,
          2,
          3,
          0,
          3,
          4,
          5,
          0,
          5,
          6,
          1,
          1,
          6,
          7,
          2,
          7,
          4,
          3,
          2,
          4,
          7,
          6,
          5,
      ]
      faces_n = [
          0,
          0,
          0,
          0,
          1,
          1,
          1,
          1,
          2,
          2,
          2,
          2,
          3,
          3,
          3,
          3,
          4,
          4,
          4,
          4,
          5,
          5,
          5,
          5,
      ]
      faces_t = [
          0,
          1,
          2,
          3,
          0,
          1,
          2,
          3,
          0,
          1,
          2,
          3,
          3,
          2,
          1,
          0,
          0,
          1,
          2,
          3,
          0,
          1,
          2,
          3,
      ]
  
      vertices = np.zeros(24, vtype)
      vertices["position"] = p[faces_p]
      vertices["normal"] = n[faces_n]
      vertices["color"] = c[faces_c]
      vertices["texcoord"] = t[faces_t]
  
      filled = np.resize(
          np.array([0, 1, 2, 0, 2, 3], dtype=itype), 6 * (2 * 3)
      )
      filled += np.repeat(4 * np.arange(6, dtype=itype), 6)
      filled = filled.reshape((len(filled) // 3, 3))
  
      outline = np.resize(
          np.array([0, 1, 1, 2, 2, 3, 3, 0], dtype=itype), 6 * (2 * 4)
      )
      outline += np.repeat(4 * np.arange(6, dtype=itype), 8)
  
      return vertices, filled, outline
  
file_path: vispy/vispy/geometry/generation.py
imports: from __future__ import division
  import numpy
  from .meshdata import MeshData
label_desc: Use image node_id 1 for calling a global function with example usage: create_cube() and returns: vertices,  filled,  outline