'Try to decode the id.
:param  object_name:      Name of the object the id belongs to. (optional)
:type   object_name:      str'

def __decode_id(self, trans, encoded_id, object_name=None):

    try:
        return trans.security.decode_id(encoded_id)
    except TypeError:
        raise exceptions.MalformedId((('Malformed    %s    id    specified,    unable    to    decode.' % object_name) if (object_name is not None) else ''))
    except ValueError:
        raise exceptions.MalformedId((('Wrong    %s    id    specified,    unable    to    decode.' % object_name) if (object_name is not None) else ''))
