def _ValidateTestPathPartName(name):
    'Checks whether a Master, Bot or TestMetadata name is OK.'
    if (name.startswith('__') and name.endswith('__')):
        raise BadRequestError(('Invalid name: "%s". Names cannot start and end with "__".' % name))
Checks whether a Master, Bot or TestMetadata name is OK.
def _ValidateTestPathPartName(name):
    
    if (name.startswith('__') and name.endswith('__')):
        raise BadRequestError(('Invalid name: "%s". Names cannot start and end with "__".' % name))