<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_complex(prop, value, xpath_map=None):
 """ Default validation for single complex data structure """


    if value is not None:
        validate_type(prop, value, dict)

        if prop in _complex_definitions:
            complex_keys = _complex_definitions[prop]
        else:
            complex_keys = {} if xpath_map is None else xpath_map

        for complex_prop, complex_val in iteritems(value):
            complex_key = '.'.join((prop, complex_prop))

            if complex_prop not in complex_keys:
                _validation_error(prop, None, value, ('keys: {0}'.format(','.join(complex_keys))))

            validate_type(complex_key, complex_val, (string_types, list))