nodes: 0, module; 1, function_definition; 2, function_name:_getArrays; 3, parameters; 4, block; 5, identifier:items; 6, identifier:attr; 7, identifier:defaultValue; 8, expression_statement; 9, expression_statement; 10, for_statement; 11, for_statement; 12, return_statement; 13, comment:"""Return arrays with equal size of item attributes from a list of sorted
      "items" for fast and convenient data processing.
  
      :param attr: list of item attributes that should be added to the returned
          array.
      :param defaultValue: if an item is missing an attribute, the "defaultValue"
          is added to the array instead.
  
      :returns: {'attribute1': numpy.array([attributeValue1, ...]), ...}
      """; 14, assignment; 15, identifier:item; 16, identifier:items; 17, block; 18, identifier:key; 19, list_comprehension; 20, block; 21, identifier:arrays; 22, identifier:arrays; 23, call; 24, for_statement; 25, identifier:_; 26, for_in_clause; 27, expression_statement; 28, identifier:dict; 29, argument_list; 30, identifier:key; 31, identifier:attr; 32, block; 33, identifier:_; 34, call; 35, assignment; 36, list_comprehension; 37, expression_statement; 38, identifier:viewkeys; 39, argument_list; 40, subscript; 41, call; 42, tuple; 43, for_in_clause; 44, call; 45, identifier:arrays; 46, identifier:arrays; 47, identifier:key; 48, attribute; 49, argument_list; 50, identifier:key; 51, list; 52, identifier:key; 53, identifier:attr; 54, attribute; 55, argument_list; 56, identifier:numpy; 57, identifier:array; 58, subscript; 59, subscript; 60, identifier:append; 61, call; 62, identifier:arrays; 63, identifier:key; 64, identifier:arrays; 65, identifier:key; 66, identifier:getattr; 67, argument_list; 68, identifier:item; 69, identifier:key; 70, identifier:defaultValue
code: def _getArrays(items, attr, defaultValue):
      """Return arrays with equal size of item attributes from a list of sorted
      "items" for fast and convenient data processing.
  
      :param attr: list of item attributes that should be added to the returned
          array.
      :param defaultValue: if an item is missing an attribute, the "defaultValue"
          is added to the array instead.
  
      :returns: {'attribute1': numpy.array([attributeValue1, ...]), ...}
      """
      arrays = dict([(key, []) for key in attr])
      for item in items:
          for key in attr:
              arrays[key].append(getattr(item, key, defaultValue))
      for key in [_ for _ in viewkeys(arrays)]:
          arrays[key] = numpy.array(arrays[key])
  
      return arrays