code: def __part_type(self, part, input):
          
          if part.element is None:
              query = TypeQuery(part.type)
          else:
              query = ElementQuery(part.element)
          part_type = query.execute(self.schema())
          if part_type is None:
              raise TypeNotFound(query.ref)
          if part.type is not None:
              part_type = PartElement(part.name, part_type)
          if not input:
              return part_type
          if part_type.name is None:
              return part.name, part_type
          return part_type.name, part_type
docs: Get a I{parameter definition} (pdef) defined for a given body or header
          message part.
  
          An input I{pdef} is a (I{name}, L{xsd.sxbase.SchemaObject}) tuple,
          while an output I{pdef} is a L{xsd.sxbase.SchemaObject}.
  
          @param part: A service method input or output part.
          @type part: I{suds.wsdl.Part}
          @param input: Defines input/output message.
          @type input: boolean
          @return:  A list of parameter definitions
          @rtype: [I{pdef},...]