code: def _kname(obj):
      '''Get name or names out of json result from API server'''
      if isinstance(obj, dict):
          return [obj.get("metadata", {}).get("name", "")]
      elif isinstance(obj, (list, tuple)):
          names = []
          for i in obj:
              names.append(i.get("metadata", {}).get("name", ""))
          return names
      else:
          return "Unknown typef _kname(obj):
      '''Get name or names out of json result from API server'''
      if isinstance(obj, dict):
          return [obj.get("metadata", {}).get("name", "")]
      elif isinstance(obj, (list, tuple)):
          names = []
          for i in obj:
              names.append(i.get("metadata", {}).get("name", ""))
          return names
      else:
          return "Unknown type"
docs: Get name or names out of json result from API server