code: def broadcast_variables(*variables):
      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)