def __init__(self, *args, **kwargs):

        self._spec = None
        self._descriptors = None
        if 'spec' in kwargs:
            self._spec = kwargs['spec']
            del kwargs['spec']
            if 'name' not in kwargs:
                kwargs['name'] = self._spec.name
            if 'type' not in kwargs:
                if self._spec.type in PortSpec.port_type_map:
                    kwargs['type'] = PortSpec.port_type_map[self._spec.type]
            if 'signature' not in kwargs:
                kwargs['signature'] = self._spec.sigstring
#         else:
#             self.spec = None
        if 'id' not in kwargs:
            kwargs['id'] = -1
        if 'moduleId' not in kwargs:
            kwargs['moduleId'] = 0
        if 'moduleName' not in kwargs:
            kwargs['moduleName'] = ""
        if 'name' not in kwargs:
            kwargs['name'] = ""
        if 'signature' not in kwargs:
            kwargs['signature'] = ""

        DBPort.__init__(self, *args, **kwargs)

        self.set_defaults()

#             # if there is no spec, create it
#             spec_type = PortSpec.port_type_map.inverse[self.type]
#             self._spec = PortSpec(name=self.name, 
#                                   type=spec_type,
#                                   sigstring=self.signature)
Check we can interpolate values from the knowledge base.
dataset/ETHPy150Open VisTrails/VisTrails/vistrails/core/vistrail/port.py/Port.__init__--crossover with--dataset/ETHPy150Open google/grr/grr/lib/artifact_utils_test.py/ArtifactKBTest.testInterpolation