def METHOD_NAME(self, user_agents):
    filtered = {}
    if self.mobile:
        if self.platform in user_agents['mobile'] and user_agents['mobile'][self.platform]:
            filtered.update(user_agents['mobile'][self.platform])
    if self.desktop:
        if self.platform in user_agents['desktop'] and user_agents['desktop'][self.platform]:
            filtered.update(user_agents['desktop'][self.platform])
    return filtered