'Simply create a tree fragment using the name of the test-case in parse errors.'

def fragment(self, code, pxds=None, pipeline=None):

    if (pxds is None):
        pxds = {}
    if (pipeline is None):
        pipeline = []
    name = self.id()
    if name.startswith('__main__.'):
        name = name[len('__main__.'):]
    name = name.replace('.', '_')
    return TreeFragment(code, name, pxds, pipeline=pipeline)
