parameters: (partition)
return_statement: return re.sub("[0-9]+$", "", name)
docstring: Returns disk name for each found partition.
  
      :param partition:
      :return:
docstring_summary: Returns disk name for each found partition.
docstring_tokens: Returns disk name for each found partition .
function: def disk_name_for_partition(partition):
      """ Returns disk name for each found partition.
  
      :param partition:
      :return:
      """
      name = os.path.basename(partition["device"])
  
      if name.startswith("/dev/mmcblk") or name.startswith("/dev/nvme"):
          return re.sub("p[0-9]+$", "", name)
  
      return re.sub("[0-9]+$", "", name)
function_tokens: def disk_name_for_partition ( partition ) : name = os . path . basename ( partition [ "device" ] ) if name . startswith ( "/dev/mmcblk" ) or name . startswith ( "/dev/nvme" ) : return re . sub ( "p[0-9]+$" , "" , name ) return re . sub ( "[0-9]+$" , "" , name )