<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_info(self, key=None, Id=None) -> dict: """Returns information associated with Id or list index"""

        if key is not None:
            Id = self[key].Id
        return self.infos.get(Id,{})