code: def merge_variables(variables, **kwargs):
          ''' Concatenates Variables along row axis.
  
          Args:
              variables (list): List of Variables to merge. Variables can have
                  different names (and all Variables that share a name will be
                  concatenated together).
  
          Returns:
              A list of Variables.
          '''
          var_dict = OrderedDict()
          for v in variables:
              if v.name not in var_dict:
                  var_dict[v.name] = []
              var_dict[v.name].append(v)
          return [merge_variables(vars_, **kwargs)
                  for vars_ in list(var_dict.values())f merge_variables(variables, **kwargs):
          ''' Concatenates Variables along row axis.
  
          Args:
              variables (list): List of Variables to merge. Variables can have
                  different names (and all Variables that share a name will be
                  concatenated together).
  
          Returns:
              A list of Variables.
          '''
          var_dict = OrderedDict()
          for v in variables:
              if v.name not in var_dict:
                  var_dict[v.name] = []
              var_dict[v.name].append(v)
          return [merge_variables(vars_, **kwargs)
                  for vars_ in list(var_dict.values())]
docs: Concatenates Variables along row axis.
  
          Args:
              variables (list): List of Variables to merge. Variables can have
                  different names (and all Variables that share a name will be
                  concatenated together).
  
          Returns:
              A list of Variables.