<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def detect_inside_virtualenv(prefix, real_prefix, base_prefix):
 """Tell if fades is running inside a virtualenv. The params 'real_prefix' and 'base_prefix' may be None. This is copied from pip code (slightly modified), see https://github.com/pypa/pip/blob/281eb61b09d87765d7c2b92f6982b3fe76ccb0af/ pip/locations.py#L39 """

    if real_prefix is not None:
        return True

    if base_prefix is None:
        return False

    # if prefix is different than base_prefix, it's a venv
    return prefix != base_prefix