nodes: 0, module; 1, function_definition; 2, function_name:broadcast_variables; 3, parameters; 4, block; 5, list_splat_pattern; 6, expression_statement; 7, expression_statement; 8, expression_statement; 9, return_statement; 10, identifier:variables; 11, comment:"""Given any number of variables, return variables with matching dimensions
      and broadcast data.
  
      The data on the returned variables will be a view of the data on the
      corresponding original arrays, but dimensions will be reordered and
      inserted so that both broadcast arrays have the same dimensions. The new
      dimensions are sorted in order of appearance in the first variable's
      dimensions followed by the second variable's dimensions.
      """; 12, assignment; 13, assignment; 14, call; 15, identifier:dims_map; 16, call; 17, identifier:dims_tuple; 18, call; 19, identifier:tuple; 20, generator_expression; 21, identifier:_unified_dims; 22, argument_list; 23, identifier:tuple; 24, argument_list; 25, conditional_expression:var.set_dims(dims_map) if var.dims != dims_tuple else var; 26, for_in_clause; 27, identifier:variables; 28, identifier:dims_map; 29, call; 30, comparison_operator:var.dims != dims_tuple; 31, identifier:var; 32, identifier:var; 33, identifier:variables; 34, attribute; 35, argument_list; 36, attribute; 37, identifier:dims_tuple; 38, identifier:var; 39, identifier:set_dims; 40, identifier:dims_map; 41, identifier:var; 42, identifier:dims
code: def broadcast_variables(*variables):
      """Given any number of variables, return variables with matching dimensions
      and broadcast data.
  
      The data on the returned variables will be a view of the data on the
      corresponding original arrays, but dimensions will be reordered and
      inserted so that both broadcast arrays have the same dimensions. The new
      dimensions are sorted in order of appearance in the first variable's
      dimensions followed by the second variable's dimensions.
      """
      dims_map = _unified_dims(variables)
      dims_tuple = tuple(dims_map)
      return tuple(var.set_dims(dims_map) if var.dims != dims_tuple else var
                   for var in variables)