@classmethod
def from_data(cls, data):
    """Construct a trajectory from its data representation.

        Parameters
        ----------
        data : :obj:`dict`
            The data dictionary.

        Returns
        -------
        :class:`JointTrajectory`
             An instance of :class:`JointTrajectory`.
        """
    trajectory = cls()
    trajectory.data = data
    return trajectory
