<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_contacts(self, issue):
 """Returns a list of contacts for an issue Args: issue (:obj:`RequiredTagsIssue`):
 Issue record Returns: `list` of `dict` """

        # If the resources has been deleted, just return an empty list, to trigger issue deletion without notification
        if not issue.resource:
            return []

        account_contacts = issue.resource.account.contacts
        try:
            resource_owners = issue.resource.get_owner_emails()
            # Double check get_owner_emails for it's return value
            if type(resource_owners) is list:
                for resource_owner in resource_owners:
                    account_contacts.append({'type': 'email', 'value': resource_owner})
        except AttributeError:
            pass
        return account_contacts