nodes: 0, module; 1, function_definition; 2, function_name:from_arrays; 3, parameters; 4, block; 5, identifier:cls; 6, identifier:arrays; 7, default_parameter; 8, default_parameter; 9, expression_statement; 10, expression_statement; 11, if_statement; 12, comment:# Check if elements of array are list-like; 13, for_statement; 14, comment:# Check if lengths of all arrays are equal or not,; 15, comment:# raise ValueError, if not; 16, for_statement; 17, import_from_statement; 18, expression_statement; 19, if_statement; 20, return_statement; 21, identifier:sortorder; 22, None; 23, identifier:names; 24, None; 25, comment:"""
          Convert arrays to MultiIndex.
  
          Parameters
          ----------
          arrays : list / sequence of array-likes
              Each array-like gives one level's value for each data point.
              len(arrays) is the number of levels.
          sortorder : int or None
              Level of sortedness (must be lexicographically sorted by that
              level).
          names : list / sequence of str, optional
              Names for the levels in the index.
  
          Returns
          -------
          index : MultiIndex
  
          See Also
          --------
          MultiIndex.from_tuples : Convert list of tuples to MultiIndex.
          MultiIndex.from_product : Make a MultiIndex from cartesian product
                                    of iterables.
          MultiIndex.from_frame : Make a MultiIndex from a DataFrame.
  
          Examples
          --------
          >>> arrays = [[1, 1, 2, 2], ['red', 'blue', 'red', 'blue']]
          >>> pd.MultiIndex.from_arrays(arrays, names=('number', 'color'))
          MultiIndex(levels=[[1, 2], ['blue', 'red']],
                     codes=[[0, 0, 1, 1], [1, 0, 1, 0]],
                     names=['number', 'color'])
          """; 26, assignment; 27, not_operator; 28, block; 29, elif_clause; 30, identifier:array; 31, identifier:arrays; 32, block; 33, identifier:i; 34, call; 35, block; 36, dotted_name; 37, dotted_name; 38, assignment; 39, comparison_operator:names is None; 40, block; 41, call; 42, identifier:error_msg; 43, string:"Input must be a list / sequence of array-likes."; 44, call; 45, raise_statement; 46, call; 47, block; 48, if_statement; 49, identifier:range; 50, argument_list; 51, if_statement; 52, identifier:pandas; 53, identifier:core; 54, identifier:arrays; 55, identifier:categorical; 56, identifier:_factorize_from_iterables; 57, pattern_list; 58, call; 59, identifier:names; 60, None; 61, expression_statement; 62, identifier:MultiIndex; 63, argument_list; 64, identifier:is_list_like; 65, argument_list; 66, call; 67, identifier:is_iterator; 68, argument_list; 69, expression_statement; 70, not_operator; 71, block; 72, integer:1; 73, call; 74, comparison_operator:len(arrays[i]) != len(arrays[i - 1]); 75, block; 76, identifier:codes; 77, identifier:levels; 78, identifier:_factorize_from_iterables; 79, argument_list; 80, assignment; 81, keyword_argument; 82, keyword_argument; 83, keyword_argument; 84, keyword_argument; 85, keyword_argument; 86, identifier:arrays; 87, identifier:TypeError; 88, argument_list; 89, identifier:arrays; 90, assignment; 91, call; 92, raise_statement; 93, identifier:len; 94, argument_list; 95, call; 96, call; 97, raise_statement; 98, identifier:arrays; 99, identifier:names; 100, list_comprehension; 101, identifier:levels; 102, identifier:levels; 103, identifier:codes; 104, identifier:codes; 105, identifier:sortorder; 106, identifier:sortorder; 107, identifier:names; 108, identifier:names; 109, identifier:verify_integrity; 110, False; 111, identifier:error_msg; 112, identifier:arrays; 113, call; 114, identifier:is_list_like; 115, argument_list; 116, call; 117, identifier:arrays; 118, identifier:len; 119, argument_list; 120, identifier:len; 121, argument_list; 122, call; 123, call; 124, for_in_clause; 125, identifier:list; 126, argument_list; 127, identifier:array; 128, identifier:TypeError; 129, argument_list; 130, subscript; 131, subscript; 132, identifier:ValueError; 133, argument_list; 134, identifier:getattr; 135, argument_list; 136, identifier:arr; 137, identifier:arrays; 138, identifier:arrays; 139, identifier:error_msg; 140, identifier:arrays; 141, identifier:i; 142, identifier:arrays; 143, binary_operator:i - 1; 144, string; 145, identifier:arr; 146, string:"name"; 147, None; 148, identifier:i; 149, integer:1; 150, string_content:all arrays must be same length
code: def from_arrays(cls, arrays, sortorder=None, names=None):
          """
          Convert arrays to MultiIndex.
  
          Parameters
          ----------
          arrays : list / sequence of array-likes
              Each array-like gives one level's value for each data point.
              len(arrays) is the number of levels.
          sortorder : int or None
              Level of sortedness (must be lexicographically sorted by that
              level).
          names : list / sequence of str, optional
              Names for the levels in the index.
  
          Returns
          -------
          index : MultiIndex
  
          See Also
          --------
          MultiIndex.from_tuples : Convert list of tuples to MultiIndex.
          MultiIndex.from_product : Make a MultiIndex from cartesian product
                                    of iterables.
          MultiIndex.from_frame : Make a MultiIndex from a DataFrame.
  
          Examples
          --------
          >>> arrays = [[1, 1, 2, 2], ['red', 'blue', 'red', 'blue']]
          >>> pd.MultiIndex.from_arrays(arrays, names=('number', 'color'))
          MultiIndex(levels=[[1, 2], ['blue', 'red']],
                     codes=[[0, 0, 1, 1], [1, 0, 1, 0]],
                     names=['number', 'color'])
          """
          error_msg = "Input must be a list / sequence of array-likes."
          if not is_list_like(arrays):
              raise TypeError(error_msg)
          elif is_iterator(arrays):
              arrays = list(arrays)
  
          # Check if elements of array are list-like
          for array in arrays:
              if not is_list_like(array):
                  raise TypeError(error_msg)
  
          # Check if lengths of all arrays are equal or not,
          # raise ValueError, if not
          for i in range(1, len(arrays)):
              if len(arrays[i]) != len(arrays[i - 1]):
                  raise ValueError('all arrays must be same length')
  
          from pandas.core.arrays.categorical import _factorize_from_iterables
  
          codes, levels = _factorize_from_iterables(arrays)
          if names is None:
              names = [getattr(arr, "name", None) for arr in arrays]
  
          return MultiIndex(levels=levels, codes=codes, sortorder=sortorder,
                            names=names, verify_integrity=False)