Return a unicode object with the Gremlin representation of this block.

def to_gremlin(self):
        """Return a unicode object with the Gremlin representation of this block."""
        self.validate()
        template_data = {
            'direction': self.direction,
            'edge_name': self.edge_name,
            'inverse_direction': 'in' if self.direction == 'out' else 'out'
        }
        return (u'collectMany{{entry -> entry.{direction}_{edge_name}'
                u'.collect{{edge -> edge.{inverse_direction}V.next()}}}}'
                .format(**template_data))