<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def getSubstitutionElement(self, elt, ps):
        '''if elt matches a member of the head substitutionGroup, return 
        the GED typecode representation of the member.

        head -- ElementDeclaration typecode, 
        elt -- the DOM element being parsed
        ps -- ParsedSoap instance
        '''
        nsuri,ncname = _get_element_nsuri_name(elt)
        typecode = GED(nsuri,ncname)
        if typecode is None:
            return

        try:
            nsuri,ncname = typecode.substitutionGroup
        except (AttributeError, TypeError):
            return

        if (ncname == self.pname) and (nsuri == self.nspname or 
           (not nsuri and not self.nspname)):
             return typecode
       
        return