@staticmethod
    def from_string(id_str):
        """
        Create and return a PstatRdsId from a compliant rds_id.

        >>> rds_id = PstatRdsId('test', '10.9.0', 3)
        >>> id_str = str(rds_id)
        >>> new_rds_id = PstatRdsId(id_str)
        >>> rds_id == new_rds_id
        True
        """
        try:
            pstat_instance, tail = id_str.split('-v-')
            pstat_version, counter = tail.split('-db-')
            counter = int(counter)

            return PstatRdsId(pstat_instance, pstat_version, counter)
        except __HOLE__:
            pass

        return None
dataset/ETHPy150Open winhamwr/neckbeard/neckbeard/environment_manager.py/PstatRdsId.from_string