<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def validate_resource(resource) -> None: """Validates a resource"""

    if resource is not None and not isinstance(resource, dict):
        raise ValidationError('The resource is not valid.')

    if isinstance(resource, dict) and set(resource.keys()) <= {'requests', 'limits'}:
        raise ValidationError(
            'The keys `{}` for the resource are not valid.'.format(set(resource.keys())))