<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _get_reference(document_path, reference_map):
 """Get a document reference from a dictionary. This just wraps a simple dictionary look-up with a helpful error that is specific to :meth:`~.firestore.client.Client.get_all`, the **public** caller of this function. Args: document_path (str):
 A fully-qualified document path. reference_map (Dict[str, .DocumentReference]):
 A mapping (produced by :func:`_reference_info`) of fully-qualified document paths to document references. Returns: .DocumentReference: The matching reference. Raises: ValueError: If ``document_path`` has not been encountered. """

    try:
        return reference_map[document_path]
    except KeyError:
        msg = _BAD_DOC_TEMPLATE.format(document_path)
        raise ValueError(msg)