def create_lease_object_from_subnet(self, subnet):
if '<STR_LIT:/>' not in subnet:<EOL><INDENT>subnet = '<STR_LIT>'.format(subnet, self._cidr)<EOL><DEDENT>try:<EOL><INDENT>if not self.is_leasable_subnet(subnet):<EOL><INDENT>raise LagoSubnetLeaseOutOfRangeException(<EOL>subnet, self.get_allowed_range()<EOL>)<EOL><DEDENT><DEDENT>except AddrFormatError:<EOL><INDENT>raise LagoSubnetLeaseMalformedAddrException(subnet)<EOL><DEDENT>return Lease(store_path=self.path, subnet=subnet)<EOL>
Create a lease from ip in a dotted decimal format,
(for example `192.168.200.0/24`). the _cidr will be added if not exist
in `subnet`.

Args:
    subnet (str): The value of the third octet

Returns:
    Lease: Lease object which represents the requested subnet.

Raises:
    LagoSubnetLeaseOutOfRangeException: If the resultant subnet is
    malformed or out of the range of the store.