def METHOD_NAME(self, access_token, field_name, kwargs):
    if field_name not in kwargs:
        return
    result = paas_cc.get_project(access_token, kwargs[field_name])
    if result.get("code") != ErrorCode.NoError:
        msg = _("项目Code或者ID不正确: {}").format(result.get("message", ""))
        raise error_codes.APIError.f(msg, replace=True)
    if self.project_field_name == "project_code":
        field_value = result["data"]["english_name"]
    elif self.project_field_name == "project_id":
        field_value = result["data"]["project_id"]
    else:
        field_value = kwargs[field_name]
    kwargs[self.project_field_name] = field_value
    self.kwargs[self.project_field_name] = field_value
    kwargs.pop(field_name, "")
    self.kwargs.pop(field_name, "")