def METHOD_NAME(self, cid=None, co=None):
    """
    Returns container tags for the given container, inspecting the container if needed
    :param container: either the container id or container dict returned by docker-py
    :return: tags as list<string>, cached
    """
    if (cid is not None) and (co is not None):
        self.log.error("Can only pass either a container id or object, not both, returning empty tags")
        return []
    if (cid is None) and (co is None):
        self.log.error("Need one container id or container object, returning empty tags")
        return []
    elif co is not None:
        if 'Id' in co:
            cid = co.get('Id')
        else:
            self.log.warning("Invalid container dict, returning empty tags")
            return []
    if cid in self._container_tags_cache:
        return self._container_tags_cache[cid]
    else:
        if self.needs_inspect_config and (co is None or 'Config' not in co):
            co = self.docker_util.inspect_container(cid)
        if self.needs_inspect_labels and (co is None or 'Labels' not in co):
            co = self.docker_util.inspect_container(cid)
        self._container_tags_cache[cid] = self._get_cacheable_tags(cid, co)
        return self._container_tags_cache[cid]