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