<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def filter_none(data: Dict[str, Any], keys: OptKeys = None) -> Dict[str, Any]: """Filter keys from dict with None values. Check occurs only on root level. If list of keys specified, filter works only for selected keys """


    def limited_filter(k: str, v: Any) -> bool:
        return k not in keys or v is not None  # type: ignore

    def full_filter(k: str, v: Any) -> bool:
        return v is not None

    f = limited_filter if keys is not None else full_filter
    return {k: v for k, v in data.items() if f(k, v)}