def METHOD_NAME(
    definitions: dict[str, dict[str, list[dict[str, Any]]]],
    definitions_raw: Dict[str, List[Tuple[int, str]]]
) -> Dict[str, Dict[str, Any]]:
    definitions_context: dict[str, dict[str, Any]] = defaultdict(dict)
    supported_block_types = ("data", "resource")
    for full_file_path, definition in definitions.items():
        for block_type in supported_block_types:
            entities = definition.get(block_type, [])
            for entity in entities:
                context_parser = parser_registry.context_parsers[block_type]
                definition_path = context_parser.get_entity_context_path(entity)
                if len(definition_path) > 1:
                    resource_type = definition_path[0]
                    resource_name = definition_path[1]
                    entity_id = entity.get(resource_type, {}).get(resource_name, {}).get(TF_PLAN_RESOURCE_ADDRESS)
                else:
                    entity_id = definition_path[0]
                # Entity can exist only once per dir, for file as well
                entity_context = get_entity_context(
                    definitions=definitions,
                    definitions_raw=definitions_raw,
                    definition_path=definition_path,
                    full_file_path=full_file_path,
                    entity_id=entity_id,
                    block_type=block_type,
                )
                definitions_context[full_file_path][entity_id] = entity_context
    return definitions_context