def METHOD_NAME(self, resource):
    freeform_tags = resource.get("freeform_tags")
    defined_tags = resource.get("defined_tags")
    METHOD_NAME = {}
    METHOD_NAME["freeform_tags"] = len(freeform_tags)
    namespace_tag_count = {}
    for namespace in defined_tags:
        namespace_tag_count[namespace] = len(defined_tags.get(namespace))
    METHOD_NAME["defined_tags"] = namespace_tag_count
    return METHOD_NAME