def from_cuboid(cls, vertices, frame_size=None, label=None, **attributes):
        """Constructs a cuboid from its 8 vertices in the format below::

               7--------6
              /|       /|
             / |      / |
            3--------2  |
            |  4-----|--5
            | /      | /
            |/       |/
            0--------1

        If a ``frame_size`` is provided, ``vertices`` must be absolute pixel
        coordinates; otherwise ``vertices`` should be normalized coordinates in
        ``[0, 1] x [0, 1]``.

        Args:
            vertices: a list of 8 ``(x, y)`` vertices in the above format
            frame_size (None): the ``(width, height)`` of the frame
            label (None): the label string
            **attributes: additional arguments for the :class:`Polyline`

        Returns:
            a :class:`Polyline`
        """
        vertices = np.asarray(vertices)
        if frame_size is not None:
            vertices /= np.asarray(frame_size)[np.newaxis, :]

        front = vertices[:4]
        back = vertices[4:]
        top = vertices[[3, 2, 6, 7], :]
        bottom = vertices[[0, 1, 5, 4], :]
        faces = [front.tolist(), back.tolist(), top.tolist(), bottom.tolist()]
        return cls(label=label, points=faces, closed=True, **attributes)
Constructs a cuboid from its 8 vertices in the format below::

               7--------6
              /|       /|
             / |      / |
            3--------2  |
            |  4-----|--5
            | /      | /
            |/       |/
            0--------1

        If a ``frame_size`` is provided, ``vertices`` must be absolute pixel
        coordinates; otherwise ``vertices`` should be normalized coordinates in
        ``[0, 1] x [0, 1]``.

        Args:
            vertices: a list of 8 ``(x, y)`` vertices in the above format
            frame_size (None): the ``(width, height)`` of the frame
            label (None): the label string
            **attributes: additional arguments for the :class:`Polyline`

        Returns:
            a :class:`Polyline`
        
fiftyone/core/labels.py