<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def in_directory(filepath, dirpath):
 """Returns a boolean for whether filepath is contained in dirpath. Normalizes the paths (e.g. resolving symlinks and ..) so this is the safe way to make sure a user-configured path is located inside the user's project repo. """

    filepath = os.path.realpath(filepath)
    dirpath = os.path.realpath(dirpath)
    return filepath == dirpath or filepath.startswith(os.path.join(dirpath, ""))