code: def _add_res(line):
      '''
      Analyse the line of local resource of ``drbdadm status``
      '''
      global resource
      fields = line.strip().split()
  
      if resource:
          ret.append(resource)
          resource = {}
  
      resource["resource name"] = fields[0]
      resource["local role"] = fields[1].split(":")[1]
      resource["local volumes"] = []
      resource["peer nodes"] = [f _add_res(line):
      '''
      Analyse the line of local resource of ``drbdadm status``
      '''
      global resource
      fields = line.strip().split()
  
      if resource:
          ret.append(resource)
          resource = {}
  
      resource["resource name"] = fields[0]
      resource["local role"] = fields[1].split(":")[1]
      resource["local volumes"] = []
      resource["peer nodes"] = []
docs: Analyse the line of local resource of ``drbdadm status``