<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def gcp(main=False):
 """ Get the current project Parameters main: bool If True, the current main project is returned, otherwise the current subproject is returned. See Also -------- scp: Sets the current project project: Creates a new project"""

    if main:
        return project() if _current_project is None else _current_project
    else:
        return gcp(True) if _current_subproject is None else \
            _current_subproject