<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def log_images(self, name, images, step=None):
 """Log new images for given name on given step. Args: name (str):
 name of the variable (it will be converted to a valid tensorflow summary name). images (list):
 list of images to visualize step (int):
 non-negative integer used for visualization """

        if isinstance(images, six.string_types):
            raise TypeError('"images" should be a list of ndarrays, got {}'
                            .format(type(images)))

        self._check_step(step)
        tf_name = self._ensure_tf_name(name)

        summary = self._image_summary(tf_name, images, step=step)
        self._log_summary(tf_name, summary, images, step=step)