<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def edit(args):
 tap = DbTap.find(args.id) """ Carefully setup a dict """

        options = {}
        if not args.name is None:
            options["db_name"]=args.name
        if args.host is not None:
            options["db_host"]=args.host
        if args.user is not None:
            options["db_user"]=args.user
        if args.password is not None:
            options["db_passwd"] = args.password
        if args.type is not None:
            options["db_type"] = args.type
        if args.location is not None:
            options["db_location"] = args.location
        if args.port is not None:
            options["port"] = args.port
        tap = tap.edit(**options)
        return json.dumps(tap.attributes, sort_keys=True, indent=4)