code: def generate_tensor_filename(self, field_name, file_num, compressed=True):
          
          file_ext = TENSOR_EXT
          if compressed:
              file_ext = COMPRESSED_TENSOR_EXT
          filename = os.path.join(self.filename, 'tensors', '%s_%05d%s' %(field_name, file_num, file_ext))
          return filename
docs: Generate a filename for a tensor.