@classmethod
def head_by_id(cls, session, resource_id, path_args=None):
    """Get an object representing the headers of a remote resource.

        :param session: The session to use for making this request.
        :type session: :class:`~ecl.session.Session`
        :param resource_id: This resource's identifier, if needed by
                            the request.
        :param dict path_args: A dictionary of arguments to construct
                               a compound URL.
                               See `How path_args are used`_ for details.

        :return: A :class:`Resource` representing the headers.
        :raises: :exc:`~ecl.exceptions.MethodNotSupported` if
                 :data:`Resource.allow_head` is not set to ``True``.
        """
    data = cls.head_data_by_id(session, resource_id, path_args=path_args)
    return cls.existing(**data)
