def _MaybeDeleteFunction(self, f):
    'Visit a Function and return None if we can remove it.'
    signatures = tuple((self._MaybeRemoveSignature(f.name, sig, f.is_abstract) for sig in f.signatures))
    if any(signatures):
        if signatures.count(None):
            return f.Replace(signatures=tuple((s for s in signatures if (s is not None))))
        else:
            return f
    else:
        return None
Visit a Function and return None if we can remove it.
def _MaybeDeleteFunction(self, f):
    
    signatures = tuple((self._MaybeRemoveSignature(f.name, sig, f.is_abstract) for sig in f.signatures))
    if any(signatures):
        if signatures.count(None):
            return f.Replace(signatures=tuple((s for s in signatures if (s is not None))))
        else:
            return f
    else:
        return None