<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def measure(self, vid):
 """Return a measure, given its vid or another reference"""


        from ambry.orm import Column

        if isinstance(vid, PartitionColumn):
            return vid
        elif isinstance(vid, Column):
            return PartitionColumn(vid)
        else:
            return PartitionColumn(self.table.column(vid), self)