@staticmethod
def fileid(file_or_id):
    """Gets the ID of a given :class:`StoredFile`

        If the given parameter is already a StoredFile id it will
        directly return it.
        """
    return getattr(file_or_id, 'file_id', file_or_id)
