def METHOD_NAME(self):
    # Process namespace tokens
    namespace = self.project_config.project__package__namespace
    if "managed" in self.options:
        managed = process_bool_arg(self.options["managed"])
    else:
        managed = (
            bool(namespace) and namespace in self.org_config.installed_packages
        )
    if "namespaced" in self.options:
        namespaced = process_bool_arg(self.options["namespaced"])
    else:
        namespaced = bool(namespace) and self.org_config.namespace == namespace
    namespace_prefix = ""
    if namespace and (managed or namespaced):
        namespace_prefix = namespace + "__"
    self.object_name = self.object_name.replace("%%%NAMESPACE%%%", namespace_prefix)
    self.field_name = self.field_name.replace("%%%NAMESPACE%%%", namespace_prefix)