code: def test_formula_from_recarray():
      D = np.rec.array(
          [
              (43, 51, 30, 39, 61, 92, "blue"),
              (63, 64, 51, 54, 63, 73, "blue"),
              (71, 70, 68, 69, 76, 86, "red"),
              (61, 63, 45, 47, 54, 84, "red"),
              (81, 78, 56, 66, 71, 83, "blue"),
              (43, 55, 49, 44, 54, 49, "blue"),
              (58, 67, 42, 56, 66, 68, "green"),
              (71, 75, 50, 55, 70, 66, "green"),
              (72, 82, 72, 67, 71, 83, "blue"),
              (67, 61, 45, 47, 62, 80, "red"),
              (64, 53, 53, 58, 58, 67, "blue"),
              (67, 60, 47, 39, 59, 74, "green"),
              (69, 62, 57, 42, 55, 63, "blue"),
              (68, 83, 83, 45, 59, 77, "red"),
              (77, 77, 54, 72, 79, 77, "red"),
              (81, 90, 50, 72, 60, 54, "blue"),
              (74, 85, 64, 69, 79, 79, "green"),
              (65, 60, 65, 75, 55, 80, "green"),
              (65, 70, 46, 57, 75, 85, "red"),
              (50, 58, 68, 54, 64, 78, "red"),
              (50, 40, 33, 34, 43, 64, "blue"),
              (64, 61, 52, 62, 66, 80, "blue"),
              (53, 66, 52, 50, 63, 80, "red"),
              (40, 37, 42, 58, 50, 57, "red"),
              (63, 54, 42, 48, 66, 75, "blue"),
              (66, 77, 66, 63, 88, 76, "blue"),
              (78, 75, 58, 74, 80, 78, "red"),
              (48, 57, 44, 45, 51, 83, "blue"),
              (85, 85, 71, 71, 77, 74, "red"),
              (82, 82, 39, 59, 64, 78, "blue"),
          ],
          dtype=[
              ("y", "i8"),
              ("x1", "i8"),
              ("x2", "i8"),
              ("x3", "i8"),
              ("x4", "i8"),
              ("x5", "i8"),
              ("x6", "|S5"),
          ],
      )
      f = F.Formula.fromrec(D, drop="y")
      assert {str(t) for t in f.terms} == {
          "x1",
          "x2",
          "x3",
          "x4",
          "x5",
          "x6_green",
          "x6_blue",
          "x6_red",
      }
      assert {str(t) for t in f.design_expr} == {
          "x1",
          "x2",
          "x3",
          "x4",
          "x5",
          "x6_green",
          "x6_blue",
          "x6_red",
      }
  
imports: from warnings import catch_warnings, simplefilter
  import numpy
  import pytest
  import sympy
  from numpy.core.records import fromrecords
  from numpy.testing import assert_almost_equal, assert_array_equal
  from sympy.utilities.lambdify import implemented_function
  from nipy.utils import VisibleDeprecationWarning
  from ..None import formulae
  from ..formulae import Term, terms
label_desc: Use image node_id 5 for calling a global function with example usage: test_formula_from_recarray() without return types