code: def begin_subsegment(self, name, namespace='local'):
          
  
          segment = self.current_segment()
          if not segment:
              log.warning("No segment found, cannot begin subsegment %s." % name)
              return None
  
          if not segment.sampled:
              subsegment = DummySubsegment(segment, name)
          else:
              subsegment = Subsegment(name, namespace, segment)
  
          self.context.put_subsegment(subsegment)
  
          return subsegment
docs: Begin a new subsegment.
          If there is open subsegment, the newly created subsegment will be the
          child of latest opened subsegment.
          If not, it will be the child of the current open segment.
  
          :param str name: the name of the subsegment.
          :param str namespace: currently can only be 'local', 'remote', 'aws'.