docstr: Simply create a tree fragment using the name of the test-case in parse errors.
docstr_tok: ["Simply","create","a","tree","fragment","using","the","name","of","the","test-case","in","parse","errors","."]
code: def fragment(self, code, pxds=None, pipeline=None):
      "Simply create a tree fragment using the name of the test-case in parse errors."
      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)
  
imports: from __future__ import absolute_import
  import os
  import unittest
  import tempfile
  from .Compiler import Errors
  from .CodeWriter import CodeWriter
  from .Compiler.TreeFragment import TreeFragment, strip_common_indent
  from .Compiler.Visitor import TreeVisitor, VisitorTransform
  from .Compiler import TreePath
label_desc: Use image node_id 8 for calling the CythonTest obj's underlying member method code with example usage: obj.fragment(code, pxds, pipeline) and returns: TreeFragment