'Close file.
Args:
finalize: Specifies if file should be finalized upon closing.'

def close(self, finalize=False):

    if self._closed:
        return
    self._closed = True
    request = file_service_pb.CloseRequest()
    response = file_service_pb.CloseResponse()
    request.set_filename(self._filename)
    request.set_finalize(finalize)
    self._make_rpc_call_with_retry('Close', request, response)
