<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_completions(self, candidates):
 """ Given an iterable collection of block_keys in the course, returns a mapping of the block_keys to the present completion values of their associated blocks. If a completion is not found for a given block in the current course, 0.0 is returned. The service does not attempt to verify that the block exists within the course. Parameters: candidates: collection of BlockKeys within the current course. Note: Usage keys may not have the course run filled in for old mongo courses. This method checks for completion records against a set of BlockKey candidates with the course run filled in from self._course_key. Return value: dict[BlockKey] -> float: Mapping blocks to their completion value. """

        queryset = BlockCompletion.user_course_completion_queryset(self._user, self._course_key).filter(
            block_key__in=candidates
        )
        completions = BlockCompletion.completion_by_block_key(queryset)
        candidates_with_runs = [candidate.replace(course_key=self._course_key) for candidate in candidates]
        for candidate in candidates_with_runs:
            if candidate not in completions:
                completions[candidate] = 0.0
        return completions