Returns the list of all tf.Variables created by module instantiation.

def variables(self):
    """Returns the list of all tf.Variables created by module instantiation."""
    result = []
    for _, value in sorted(self.variable_map.items()):
      if isinstance(value, list):
        result.extend(value)
      else:
        result.append(value)
    return result