<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def contracts_data_path(version: Optional[str] = None):
 """Returns the deployment data directory for a version."""

    if version is None:
        return _BASE.joinpath('data')
    return _BASE.joinpath(f'data_{version}')