def METHOD_NAME(self, file_name, final_path):
    with open(final_path, 'rb') as img:
        resource = ResourceHelper.make_written_file_resource(file_name=file_name,
                                                             agent=Agent.get_agent_from_id(self.session,
                                                                                           self.agent_id),
                                                             agent_execution=AgentExecution
                                                             .get_agent_execution_from_id(self.session,
                                                                                          self.agent_execution_id),
                                                             session=self.session)
        if resource.storage_type == StorageType.S3.value:
            s3_helper = S3Helper()
            s3_helper.upload_file(img, path=resource.path)