code: def check_required_tags_compliance(self, resource):
          
  
          missing_tags = []
          notes = []
          resource_tags = {tag.key.lower(): tag.value for tag in resource.tags}
  
          # Do not audit this resource if it is not in the Account scope
          if resource.resource_type in self.alert_schedule:
              target_accounts = self.alert_schedule[resource.resource_type]['scope']
          else:
              target_accounts = self.alert_schedule['*']['scope']
          if not (resource.account.account_name in target_accounts or '*' in target_accounts):
              return missing_tags, notes
  
          # Do not audit this resource if the ignore tag was set
          if self.audit_ignore_tag.lower() in resource_tags:
              return missing_tags, notes
  
          required_tags = list(self.required_tags)
  
          # Add GDPR tag to required tags if the account must be GDPR compliant
          if self.gdpr_enabled and resource.account.account_name in self.gdpr_accounts:
              required_tags.append(self.gdpr_tag)
  
          '''
          # Do not audit this resource if it is still in grace period
          if (datetime.utcnow() - resource.resource_creation_date).total_seconds() // 3600 < self.grace_period:
              return missing_tags, notes
          '''
  
          # Check if the resource is missing required tags or has invalid tag values
          for key in [tag.lower() for tag in required_tags]:
              if key not in resource_tags:
                  missing_tags.append(key)
              elif not self.validate_tag(key, resource_tags[key]):
                  missing_tags.append(key)
                  notes.append('{} tag is not valid'.format(key))
  
          return missing_tags, notes
docs: Check whether a resource is compliance
  
          Args:
              resource: A single resource
  
          Returns:
              `(list, list)`
              A tuple contains missing tags (if there were any) and notes