<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_merged_env(self, include_os=False):
 """ Copying and merging environment variables. Args: include_os (bool):
 when true then include the environment variables (default: False) Returns: dict: environment variables as defined in the pipeline (optional including system environment variables). """

        env = {}
        if include_os:
            env.update(os.environ.copy())
        for level in range(3):
            env.update(self.pipeline.data.env_list[level].copy())
        return env