input: def user_data_management(user_data: dict) -> dict:
      """Stores user data in a JSON file and retrieves it when needed.
      >>> user_data_management({"Name": "John", "Age": 25, "City": "New York"})
      {'Name': 'John', 'Age': 25, 'City': 'New York'}
      """
output:     
      import json
  
      def save_user_data(data: dict):
          with open('user_data.json', 'w') as file:
              json.dump(data, file)
  
      def load_user_data() -> dict:
          try:
              with open('user_data.json', 'r') as file:
                  return json.load(file)
          except FileNotFoundError:
              return {}
  
      save_user_data(user_data)
      return load_user_data()
  