def get_entity_context(self, definition_path, full_file_path):
    entity_context = {}
    if (full_file_path not in self.tf_definitions):
        logging.debug(f'Tried to look up file {full_file_path} in TF plan entity definitions, but it does not exist')
        return entity_context
    for resource in self.tf_definitions.get(full_file_path, {}).get('resource', []):
        resource_type = definition_path[0]
        if (resource_type in resource.keys()):
            resource_name = definition_path[1]
            if (resource_name in resource[resource_type].keys()):
                resource_defintion = resource[resource_type][resource_name]
                entity_context['start_line'] = resource_defintion['start_line'][0]
                entity_context['end_line'] = resource_defintion['end_line'][0]
                entity_context['code_lines'] = self.template_lines[entity_context['start_line']:entity_context['end_line']]
                entity_context['address'] = resource_defintion['__address__']
                return entity_context
    return entity_context
def get_entity_context(self, definition_path, full_file_path):
    entity_context = {}
    if (full_file_path not in self.tf_definitions):
        logging.debug(f'Tried to look up file {full_file_path} in TF plan entity definitions, but it does not exist')
        return entity_context
    for resource in self.tf_definitions.get(full_file_path, {}).get('resource', []):
        resource_type = definition_path[0]
        if (resource_type in resource.keys()):
            resource_name = definition_path[1]
            if (resource_name in resource[resource_type].keys()):
                resource_defintion = resource[resource_type][resource_name]
                entity_context['start_line'] = resource_defintion['start_line'][0]
                entity_context['end_line'] = resource_defintion['end_line'][0]
                entity_context['code_lines'] = self.template_lines[entity_context['start_line']:entity_context['end_line']]
                entity_context['address'] = resource_defintion['__address__']
                return entity_context
    return entity_context