code: def log_variables(variables=None):
    
    if variables is None:
      variables = tf.global_variables() + tf.local_variables()
    for row in format_variables(variables, join_lines=False):
      tf.logging.info(row)
docs: Logs variable information.
  
    This function logs the name, shape, type, collections, and device for either
    all variables or a given iterable of variables. In the "Device" columns,
    the nature of the variable (legacy or resource (for ResourceVariables)) is
    also specified in parenthesis.
  
    Args:
      variables: iterable of variables; if not provided, then all variables
          (in the default graph) are logged.