<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def copy_config_from_repo(namespace, workspace, from_cnamespace, from_config, from_snapshot_id, to_cnamespace, to_config):
 """Copy a method config from the methods repository to a workspace. Args: namespace (str):
 project to which workspace belongs workspace (str):
 Workspace name from_cnamespace (str):
 Source configuration namespace from_config (str):
 Source configuration name from_snapshot_id (int):
 Source configuration snapshot_id to_cnamespace (str):
 Target configuration namespace to_config (str):
 Target configuration name Swagger: https://api.firecloud.org/#!/Method_Configurations/copyFromMethodRepo DUPLICATE: https://api.firecloud.org/#!/Method_Repository/copyFromMethodRepo """


    body = {
        "configurationNamespace"  : from_cnamespace,
        "configurationName"       : from_config,
        "configurationSnapshotId" : from_snapshot_id,
        "destinationNamespace"    : to_cnamespace,
        "destinationName"         : to_config
    }
    uri = "workspaces/{0}/{1}/method_configs/copyFromMethodRepo".format(
                                                        namespace, workspace)
    return __post(uri, json=body)