def get_position(directory, identifier):
paragraph_number = get_paragraph_number(identifier)<EOL>paragraph_total = max(  <EOL>get_paragraph_number(get_identifier(document)) + <NUM_LIT:1><EOL>for document in directory.iterdir())<EOL>assert paragraph_total > paragraph_number and paragraph_total > <NUM_LIT:0><EOL>position = paragraph_number / paragraph_total<EOL>return position<EOL>
Extracts the position of a paragraph from the identifier, and the parent directory of the
paragraph.

Parameters
----------
directory : Path
    A parent directory of a paragraph.
identifier : str
    An identifier of a paragraph.

Returns
-------
float
    The estimated position of the paragraph in the range [0; 1).