def build_copy(source_credentials_or_username, dest_credentials):
    dest_module = importlib.import_module(dest_credentials)
    dest_user = User.from_credentials(dest_module.USERNAME,
                                      dest_module.PASSWORD)
    try:
        source_module = importlib.import_module(source_credentials_or_username)
    except __HOLE__:
        source = dest_user.get_profile(source_credentials_or_username)
    else:
        source = User.from_credentials(source_module.USERNAME,
                                       source_module.PASSWORD)

    return Copy(source, dest_user)
dataset/ETHPy150Open IvanMalison/okcupyd/okcupyd/tasks/copy.py/build_copy