'Initializer.
Args:
doc_id: The visible printable ASCII string identifying the document which
does not start with \'!\'. Whitespace is excluded from ids. If no id is
provided, the search service will provide one.
fields: An iterable of Field instances representing the content of the
document.
language: The code of the language used in the field values.
sort_scores: The list of scores assigned during sort evaluation. Each
sort dimension is included. Positive scores are used for ascending
sorts; negative scores for descending.
expressions: The list of computed fields which are the result of
expressions requested.
cursor: A cursor associated with the document.
rank: The rank of this document. A rank must be a non-negative integer
less than sys.maxint. If not specified, the number of seconds since
1st Jan 2011 is used. Documents are returned in descending order of
their rank.
facets: An iterable of Facet instances representing the facets for this
document.
Raises:
TypeError: If any of the parameters have invalid types, or an unknown
attribute is passed.
ValueError: If any of the parameters have invalid values.'

def __init__(self, doc_id=None, fields=None, language='en', sort_scores=None, expressions=None, cursor=None, rank=None, facets=None):

    super(ScoredDocument, self).__init__(doc_id=doc_id, fields=fields, language=language, rank=rank, facets=facets)
    self._sort_scores = self._CheckSortScores(_GetList(sort_scores))
    self._expressions = _GetList(expressions)
    if ((cursor is not None) and (not isinstance(cursor, Cursor))):
        raise TypeError(('cursor    must    be    a    Cursor,    got    %s' % cursor.__class__.__name__))
    self._cursor = cursor
