# Obtaining a poset from a matrix

I have an upper triangular matrix M with entries only 0 or 1 where all diagonal entries are 1. I want to use Sage to test whether M is the lequal_matrix of a finite poset and to obtain that poset via Sage if this is the case. Is there an easy way to do this? I did not find anything i the poset manual that seems to work. Thanks for any help!