<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_sample_info(self, individual=-1):
 """Returns the sample info of a given sample or all by default """

        if isinstance(individual, str):
            individual = self.individuals[individual]
        extra = OrderedDict()
        for format_ in self.format:
            index = getattr(self, format_)
            if index != -1:
                if format_ == 'GT':
                    d = self.genotype
                elif format_ == 'GQ':
                    d = self.genome_quality
                elif format_ == 'DP':
                    d = self.depth
                if individual == -1:
                    if len(d) != len(self.samples):
                        [self.parse_sample(i) for i in six.moves.range(len(self.samples))]
                    extra[format_] = [d[i] for i in six.moves.range(len(d))]
                else:
                    if individual not in d:
                        self.parse_sample(individual)
                    extra[format_] = [d[individual]]
        return extra