code: def to_file(file_):
          
          from sevenbridges.models.file import File
          if not file_:
              raise SbgError('File is required!')
          elif isinstance(file_, File):
              return file_.id
          elif isinstance(file_, six.string_types):
              return file_
          else:
              raise SbgError('Invalid file parameter!')
docs: Serializes file to id string
          :param file_: object to serialize
          :return: string id