@classmethod
def get_field(cls, stream, name, context=None):
    """Return the value of a single field.

        If the field is at a fixed byte offset from the beginning of the struct,
        it'll be read directly.

        If the field isn't at a fixed offset from the beginning of the struct
        (e.g. a variable-length field occurs before it) then the entire struct
        up to and including this field must be read. Unfortunately, this means
        that unrelated validation errors can be thrown if other fields have
        problems.

        :param io.BufferedIOBase stream:
            The stream to read from. It's assumed that the stream pointer is
            positioned at the start of a struct. The stream pointer is returned
            to its original position even if an exception occurred.
        :param str name:
            The name of the field to retrieve.
        :param context:
            Optional. Any object containing extra information to pass to the
            :meth:`~binobj.fields.base.Field.from_stream` method of the field.
            For fields located at a variable offset, this will be passed to the
            :meth:`~binobj.fields.base.Field.from_stream` method of *each* field
            read.

        :return: The value of the field in the struct data.

        :raise UnexpectedEOFError:
            The end of the stream was reached before the requested field could
            be completely read.
        """
    if name not in cls.__binobj_struct__.components:
        raise ValueError("%s doesn't have a field named %r." % (cls.
            __name__, name))
    field = cls.__binobj_struct__.components[name]
    original_offset = stream.tell()
    if field.offset is not None:
        try:
            stream.seek(original_offset + field.offset)
            return field.from_stream(stream, context, {})
        finally:
            stream.seek(original_offset)
    try:
        loaded_data = cls.partial_load(stream, name, context)
    finally:
        stream.seek(original_offset)
    return loaded_data[name]
