code: def clone_rtcpath_update_rt_as(path, new_rt_as):
      
      assert path and new_rt_as
      if not path or path.route_family != RF_RTC_UC:
          raise ValueError('Expected RT_NLRI path')
      old_nlri = path.nlri
      new_rt_nlri = RouteTargetMembershipNLRI(new_rt_as, old_nlri.route_target)
      return RtcPath(path.source, new_rt_nlri, path.source_version_num,
                     pattrs=path.pathattr_map, nexthop=path.nexthop,
                     is_withdraw=path.is_withdraw)
docs: Clones given RT NLRI `path`, and updates it with new RT_NLRI AS.
  
          Parameters:
              - `path`: (Path) RT_NLRI path
              - `new_rt_as`: AS value of cloned paths' RT_NLRI