code: def get_spaces_to_delete(
      n_days: int, org_name: str, api_client: Optional[HfApi] = None
  ):
      api_client = api_client or HfApi()
      spaces = api.list_spaces(author=org_name)
      spaces_to_delete = []
      for space in spaces:
          last_modified = api_client.space_info(space.id).lastModified
          age = (
              datetime.datetime.now()
              - datetime.datetime.fromisoformat(
                  last_modified.rsplit(".", 1)[0]
              )
          ).days
          if age > n_days:
              spaces_to_delete.append(space.id)
      return spaces_to_delete
  
imports: import argparse
  import datetime
  from typing import Optional
  from huggingface_hub import HfApi
label_desc: Use image node_id 2 for calling a global function with example usage: get_spaces_to_delete(n_days, org_name, api_client) and returns: spaces_to_delete