code: def mark_as_required(self):
      
      if self not in tf.get_collection(bookkeeper.GraphKeys.MARKED_LOSSES):
        tf.add_to_collection(bookkeeper.GraphKeys.MARKED_LOSSES, self)
docs: Adds this loss to the MARKED_LOSSES collection.