code: def _ReadStructureFromByteStream(
        self, byte_stream, file_offset, data_type_map, context=None):
      
      if not byte_stream:
        raise ValueError('Missing byte stream.')
  
      if not data_type_map:
        raise ValueError('Missing data type map.')
  
      try:
        return data_type_map.MapByteStream(byte_stream, context=context)
      except (dtfabric_errors.ByteStreamTooSmallError,
              dtfabric_errors.MappingError) as exception:
        raise errors.ParseError((
            'Unable to map {0:s} data at offset: 0x{1:08x} with error: '
            '{2!s}').format(data_type_map.name or '', file_offset, exception))
docs: Reads a structure from a byte stream.
  
      Args:
        byte_stream (bytes): byte stream.
        file_offset (int): offset of the structure data relative to the start
            of the file-like object.
        data_type_map (dtfabric.DataTypeMap): data type map of the structure.
        context (Optional[dtfabric.DataTypeMapContext]): data type map context.
            The context is used within dtFabric to hold state about how to map
            the data type definition onto the byte stream. In this class it is
            used to determine the size of variable size data type definitions.
  
      Returns:
        object: structure values object.
  
      Raises:
        ParseError: if the structure cannot be read.
        ValueError: if file-like object or data type map is missing.