code: def getmakeidfobject(idf, key, name):
      
      idfobject = idf.getobject(key, name)
      if not idfobject:
          return idf.newidfobject(key, Name=name)
      else:
          return idfobject
docs: get idfobject or make it if it does not exist