'Create a TreeItem for the class/function.
Args:
name: Name of the class/function.
classes: Dictonary of Class/Function instances from pyclbr.
file: Full path and module name.
Instance variables:
self.cl: Class/Function instance for the class/function name.
self.isfunction: True if self.cl is a Function.'

def __init__(self, name, classes, file):

    self.name = name
    self.classes = classes
    self.file = file
    try:
        self.cl = self.classes[self.name]
    except (IndexError, KeyError):
        self.cl = None
    self.isfunction = isinstance(self.cl, pyclbr.Function)
