code: def get_(*keyname):
      '''
      Get metadata
  
      keyname : string
          name of key
  
      .. note::
  
          If no keynames are specified, we get all (public) properties
  
      CLI Example:
  
      .. code-block:: bash
  
          salt '*' mdata.get salt:role
          salt '*' mdata.get user-script salt:role
      '''
      mdata = _check_mdata_get()
      ret = {}
  
      if not keyname:
          keyname = list_()
  
      for k in keyname:
          if mdata:
              cmd = '{0} {1}'.format(mdata, k)
              res = __salt__['cmd.run_all'](cmd, ignore_retcode=True)
              ret[k] = res['stdout'] if res['retcode'] == 0 else ''
          else:
              ret[k] = ''
  
      return ref get_(*keyname):
      '''
      Get metadata
  
      keyname : string
          name of key
  
      .. note::
  
          If no keynames are specified, we get all (public) properties
  
      CLI Example:
  
      .. code-block:: bash
  
          salt '*' mdata.get salt:role
          salt '*' mdata.get user-script salt:role
      '''
      mdata = _check_mdata_get()
      ret = {}
  
      if not keyname:
          keyname = list_()
  
      for k in keyname:
          if mdata:
              cmd = '{0} {1}'.format(mdata, k)
              res = __salt__['cmd.run_all'](cmd, ignore_retcode=True)
              ret[k] = res['stdout'] if res['retcode'] == 0 else ''
          else:
              ret[k] = ''
  
      return ret
docs: Get metadata
  
      keyname : string
          name of key
  
      .. note::
  
          If no keynames are specified, we get all (public) properties
  
      CLI Example:
  
      .. code-block:: bash
  
          salt '*' mdata.get salt:role
          salt '*' mdata.get user-script salt:role