def METHOD_NAME(traj):
    """Compute the gyration tensor of a trajectory.
    For every frame,
    .. math::
        S_{xy} = sum_{i_atoms} r^{i}_x r^{i}_y
    Parameters
    ----------
    traj : Trajectory
        Trajectory to compute gyration tensor of.
    Returns
    -------
    S_xy:  np.ndarray, shape=(traj.n_frames, 3, 3), dtype=float64
        Gyration tensors for each frame.
    References
    ----------
    .. [1] https://isg.nist.gov/deepzoomweb/measurement3Ddata_help#shape-metrics-formulas
    """
    center_of_geom = np.expand_dims(compute_center_of_geometry(traj), axis=1)
    xyz = traj.xyz - center_of_geom
    return np.einsum('...ji,...jk->...ik', xyz, xyz) / traj.n_atoms