<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_source_dir(script, directory):
 """Validate that the source directory exists and it contains the user script Args: script (str):
 Script filename. directory (str):
 Directory containing the source file. Raises: ValueError: If ``directory`` does not exist, is not a directory, or does not contain ``script``. """

    if directory:
        if not os.path.isfile(os.path.join(directory, script)):
            raise ValueError('No file named "{}" was found in directory "{}".'.format(script, directory))

    return True