code: def to_gremlin(self):
          
          self.validate()
          if len(self.start_class) == 1:
              # The official Gremlin documentation claims that this approach
              # is generally faster than the one below, since it makes using indexes easier.
              # http://gremlindocs.spmallette.documentup.com/#filter/has
              start_class = list(self.start_class)[0]
              return u'g.V({}, {})'.format('\'@class\'', safe_quoted_string(start_class))
          else:
              start_classes_list = ','.join(safe_quoted_string(x) for x in self.start_class)
              return u'g.V.has(\'@class\', T.in, [{}])'.format(start_classes_list)
docs: Return a unicode object with the Gremlin representation of this block.