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