def getattr_sdk(attr, name):
if inspect.isroutine(attr):<EOL><INDENT>if hasattr(attr, '<STR_LIT>'):<EOL><INDENT>return attr<EOL><DEDENT><DEDENT>raise AttributeError(name)<EOL>
Filter SDK attributes

Args:
    attr(attribute): Attribute as returned by :func:`getattr`.
    name(str): Attribute name.

Returns:
    `attr` if passed.