class_docstr: Button that triggers a Spaces Duplication, when the demo is on Hugging Face Spaces. Does nothing locally.
  Preprocessing: passes the button value as a {str} into the function
  Postprocessing: expects a {str} to be returned from a function, which is set as the label of the button
code: def activate(self):
      space_name = get_space()
      if space_name is not None:
          self.click(
              fn=None,
              js=f"() => {{ window.open(`https://huggingface.co/spaces/{space_name}?duplicate=true`, '_blank') }}",
          )
  
file_path: gradio/gradio/components/duplicate_button.py
imports: from __future__ import annotations
  from typing import Literal
  from gradio_client.documentation import document, set_documentation_group
  from gradio.components import Button
  from gradio.context import Context
  from gradio.utils import get_space
label_desc: Use image node_id 2 for calling the DuplicateButton obj's underlying member method code with example usage: obj.activate() without return types