def tail(self, num_frames=3):
        """Returns a list of the last few frames for the sample.

        If fewer than ``num_frames`` frames exist, only the available frames
        are returned.

        Args:
            num_frames (3): the number of frames

        Returns:
            a list of :class:`Frame` objects
        """
        if num_frames <= 0:
            return []

        frame_numbers = self._get_frame_numbers()
        if num_frames > len(frame_numbers):
            offset = None
        else:
            offset = sorted(frame_numbers)[-num_frames]

        return list(self._iter_frames(offset=offset))
Returns a list of the last few frames for the sample.

        If fewer than ``num_frames`` frames exist, only the available frames
        are returned.

        Args:
            num_frames (3): the number of frames

        Returns:
            a list of :class:`Frame` objects
        
fiftyone/core/frame.py