code: def load(template):
      
  
      try:
          data = load_json(template)
          return data, "json"
      except ValueError as e:
          try:
              data = load_yaml(template)
              return data, "yaml"
          except Exception:
              raise e
docs: Try to guess the input format