code: def group_associations_types(
          self,
          main_type,
          sub_type,
          unique_id,
          target,
          api_branch=None,
          api_entity=None,
          owner=None,
          params=None,
      ):
          
          params = params or {}
          if owner:
              params['owner'] = owner
  
          api_branch = api_branch or target.api_sub_type
          api_entity = api_entity or target.api_entity
  
          if not sub_type:
              url = '/v2/{}/{}/groups/{}'.format(main_type, unique_id, api_branch)
          else:
              url = '/v2/{}/{}/{}/groups/{}'.format(main_type, sub_type, unique_id, api_branch)
  
          for gat in self._iterate(url, params, api_entity):
              yield gat
docs: Args:
                      owner:
                      main_type:
                      sub_type:
                      unique_id:
                      target:
                      api_branch:
                      api_entity:
                      params:
  
                  Return: