def METHOD_NAME(self, resource):
    ## The file resource cannot be reset. A pointer can never point to
    ## more than one file resource. However, we can change an ephemeral
    ## resource or a file_descriptor resource.
    assert(not self.has_file_resource())
    self.resource = resource