def METHOD_NAME(self, translations, lang_code):
    po = polib.POFile()
    po.check_for_duplicates = False
    po.metadata = self.get_metadata()
    po.extend(translations)
    with tempfile.NamedTemporaryFile() as temp_file:
        po.save(temp_file.name)
        temp_file.seek(0)
        if lang_code == self.target_app_default_lang:
            return self.client.upload_resource(temp_file.name, "Menus_and_forms", "Menus_and_forms",
                                               update_resource=True)
        else:
            return self.client.upload_translation(temp_file.name, "Menus_and_forms", "Menus_and_forms",
                                                  lang_code)