parameters: (name, tensor, bad_color=None, max_images=3, family=None, step=None)
return_statement: return summary_writer_function(name, tensor, function, family=family)
docstring: Writes an image summary if possible.
docstring_summary: Writes an image summary if possible.
docstring_tokens: Writes an image summary if possible .
function: def image(name, tensor, bad_color=None, max_images=3, family=None, step=None):
    """Writes an image summary if possible."""
  
    def function(tag, scope):
      bad_color_ = (constant_op.constant([255, 0, 0, 255], dtype=dtypes.uint8)
                    if bad_color is None else bad_color)
      # Note the identity to move the tensor to the CPU.
      return gen_summary_ops.write_image_summary(
          _summary_state.writer._resource,  # pylint: disable=protected-access
          _choose_step(step),
          tag,
          array_ops.identity(tensor),
          bad_color_,
          max_images,
          name=scope)
  
    return summary_writer_function(name, tensor, function, family=family)
function_tokens: def image ( name , tensor , bad_color = None , max_images = 3 , family = None , step = None ) : def function ( tag , scope ) : bad_color_ = ( constant_op . constant ( [ 255 , 0 , 0 , 255 ] , dtype = dtypes . uint8 ) if bad_color is None else bad_color ) # Note the identity to move the tensor to the CPU. return gen_summary_ops . write_image_summary ( _summary_state . writer . _resource , # pylint: disable=protected-access _choose_step ( step ) , tag , array_ops . identity ( tensor ) , bad_color_ , max_images , name = scope ) return summary_writer_function ( name , tensor , function , family = family )