def _filter_types(types_dict):
    # type: (Dict[FunctionKey, T]) -> Dict[FunctionKey, T]
    """Filter type info before dumping it to the file."""

    def exclude(k):
        # type: (FunctionKey) -> bool
        """Exclude filter"""
        return k.path.startswith('<') or k.func_name == '<module>'

    return {k: v for k, v in iteritems(types_dict) if not exclude(k)}
def _filter_types ( types_dict ) : def exclude ( k ) : return k . path . startswith ( '<' ) or k . func_name == '<module>' return { k : v for k , v in iteritems ( types_dict ) if not exclude ( k ) }
Filter type info before dumping it to the file.