nodes: 0, module; 1, function_definition; 2, function_name:transpose; 3, parameters; 4, block; 5, identifier:self; 6, list_splat_pattern; 7, expression_statement; 8, if_statement; 9, expression_statement; 10, for_statement; 11, return_statement; 12, identifier:dims; 13, comment:"""Return a new Dataset object with all array dimensions transposed.
  
          Although the order of dimensions on each array will change, the dataset
          dimensions themselves will remain in fixed (sorted) order.
  
          Parameters
          ----------
          *dims : str, optional
              By default, reverse the dimensions on each array. Otherwise,
              reorder the dimensions to this order.
  
          Returns
          -------
          transposed : Dataset
              Each array in the dataset (including) coordinates will be
              transposed to the given order.
  
          Notes
          -----
          This operation returns a view of each array's data. It is
          lazy for dask-backed DataArrays but not for numpy-backed DataArrays
          -- the data will be fully loaded into memory.
  
          See Also
          --------
          numpy.transpose
          DataArray.transpose
          """; 14, identifier:dims; 15, block; 16, assignment; 17, pattern_list; 18, call; 19, block; 20, identifier:ds; 21, if_statement; 22, identifier:ds; 23, call; 24, identifier:name; 25, identifier:var; 26, attribute; 27, argument_list; 28, expression_statement; 29, expression_statement; 30, binary_operator:set(dims) ^ set(self.dims); 31, block; 32, attribute; 33, argument_list; 34, attribute; 35, identifier:items; 36, assignment; 37, assignment; 38, call; 39, call; 40, raise_statement; 41, identifier:self; 42, identifier:copy; 43, identifier:self; 44, identifier:_variables; 45, identifier:var_dims; 46, call; 47, subscript; 48, call; 49, identifier:set; 50, argument_list; 51, identifier:set; 52, argument_list; 53, call; 54, identifier:tuple; 55, generator_expression; 56, attribute; 57, identifier:name; 58, attribute; 59, argument_list; 60, identifier:dims; 61, attribute; 62, identifier:ValueError; 63, argument_list; 64, identifier:dim; 65, for_in_clause; 66, if_clause; 67, identifier:ds; 68, identifier:_variables; 69, identifier:var; 70, identifier:transpose; 71, list_splat; 72, identifier:self; 73, identifier:dims; 74, binary_operator:'arguments to transpose (%s) must be '
                                   'permuted dataset dimensions (%s)'
                                   % (dims, tuple(self.dims)); 75, identifier:dim; 76, identifier:dims; 77, comparison_operator:dim in var.dims; 78, identifier:var_dims; 79, concatenated_string; 80, tuple; 81, identifier:dim; 82, attribute; 83, string; 84, string; 85, identifier:dims; 86, call; 87, identifier:var; 88, identifier:dims; 89, string_content:arguments to transpose (%s) must be; 90, string_content:permuted dataset dimensions (%s); 91, identifier:tuple; 92, argument_list; 93, attribute; 94, identifier:self; 95, identifier:dims
code: def transpose(self, *dims):
          """Return a new Dataset object with all array dimensions transposed.
  
          Although the order of dimensions on each array will change, the dataset
          dimensions themselves will remain in fixed (sorted) order.
  
          Parameters
          ----------
          *dims : str, optional
              By default, reverse the dimensions on each array. Otherwise,
              reorder the dimensions to this order.
  
          Returns
          -------
          transposed : Dataset
              Each array in the dataset (including) coordinates will be
              transposed to the given order.
  
          Notes
          -----
          This operation returns a view of each array's data. It is
          lazy for dask-backed DataArrays but not for numpy-backed DataArrays
          -- the data will be fully loaded into memory.
  
          See Also
          --------
          numpy.transpose
          DataArray.transpose
          """
          if dims:
              if set(dims) ^ set(self.dims):
                  raise ValueError('arguments to transpose (%s) must be '
                                   'permuted dataset dimensions (%s)'
                                   % (dims, tuple(self.dims)))
          ds = self.copy()
          for name, var in self._variables.items():
              var_dims = tuple(dim for dim in dims if dim in var.dims)
              ds._variables[name] = var.transpose(*var_dims)
          return ds